Class HTML.Tag
- Direct Known Subclasses:
HTML.UnknownTag
- Enclosing class:
- HTML
public static class HTML.Tag extends Object
Field Summary
Modifier and Type | Field | Description |
---|---|---|
static final HTML.Tag |
A |
Tag <a> |
static final HTML.Tag |
ADDRESS |
Tag <address> |
static final HTML.Tag |
APPLET |
Tag <applet> |
static final HTML.Tag |
AREA |
Tag <area> |
static final HTML.Tag |
B |
Tag <b> |
static final HTML.Tag |
BASE |
Tag <base> |
static final HTML.Tag |
BASEFONT |
Tag <basefont> |
static final HTML.Tag |
BIG |
Tag <big> |
static final HTML.Tag |
BLOCKQUOTE |
Tag <blockquote> |
static final HTML.Tag |
BODY |
Tag <body> |
static final HTML.Tag |
BR |
Tag <br> |
static final HTML.Tag |
CAPTION |
Tag <caption> |
static final HTML.Tag |
CENTER |
Tag <center> |
static final HTML.Tag |
CITE |
Tag <cite> |
static final HTML.Tag |
CODE |
Tag <code> |
static final HTML.Tag |
COMMENT |
All comments are labeled with this tag. |
static final HTML.Tag |
CONTENT |
All text content is labeled with this tag. |
static final HTML.Tag |
DD |
Tag <dd> |
static final HTML.Tag |
DFN |
Tag <dfn> |
static final HTML.Tag |
DIR |
Tag <dir> |
static final HTML.Tag |
DIV |
Tag <div> |
static final HTML.Tag |
DL |
Tag <dl> |
static final HTML.Tag |
DT |
Tag <dt> |
static final HTML.Tag |
EM |
Tag <em> |
static final HTML.Tag |
FONT |
Tag <font> |
static final HTML.Tag |
FORM |
Tag <form> |
static final HTML.Tag |
FRAME |
Tag <frame> |
static final HTML.Tag |
FRAMESET |
Tag <frameset> |
static final HTML.Tag |
H1 |
Tag <h1> |
static final HTML.Tag |
H2 |
Tag <h2> |
static final HTML.Tag |
H3 |
Tag <h3> |
static final HTML.Tag |
H4 |
Tag <h4> |
static final HTML.Tag |
H5 |
Tag <h5> |
static final HTML.Tag |
H6 |
Tag <h6> |
static final HTML.Tag |
HEAD |
Tag <head> |
static final HTML.Tag |
HR |
Tag <hr> |
static final HTML.Tag |
HTML |
Tag <html> |
static final HTML.Tag |
I |
Tag <i> |
static final HTML.Tag |
IMG |
Tag <img> |
static final HTML.Tag |
IMPLIED |
All text content must be in a paragraph element. |
static final HTML.Tag |
INPUT |
Tag <input> |
static final HTML.Tag |
ISINDEX |
Tag <isindex> |
static final HTML.Tag |
KBD |
Tag <kbd> |
static final HTML.Tag |
LI |
Tag <li> |
static final HTML.Tag |
LINK |
Tag <link> |
static final HTML.Tag |
MAP |
Tag <map> |
static final HTML.Tag |
MENU |
Tag <menu> |
static final HTML.Tag |
META |
Tag <meta> |
static final HTML.Tag |
NOFRAMES |
Tag <noframes> |
static final HTML.Tag |
OBJECT |
Tag <object> |
static final HTML.Tag |
OL |
Tag <ol> |
static final HTML.Tag |
OPTION |
Tag <option> |
static final HTML.Tag |
P |
Tag <p> |
static final HTML.Tag |
PARAM |
Tag <param> |
static final HTML.Tag |
PRE |
Tag <pre> |
static final HTML.Tag |
S |
Tag <s> |
static final HTML.Tag |
SAMP |
Tag <samp> |
static final HTML.Tag |
SCRIPT |
Tag <script> |
static final HTML.Tag |
SELECT |
Tag <select> |
static final HTML.Tag |
SMALL |
Tag <small> |
static final HTML.Tag |
SPAN |
Tag <span> |
static final HTML.Tag |
STRIKE |
Tag <strike> |
static final HTML.Tag |
STRONG |
Tag <strong> |
static final HTML.Tag |
STYLE |
Tag <style> |
static final HTML.Tag |
SUB |
Tag <sub> |
static final HTML.Tag |
SUP |
Tag <sup> |
static final HTML.Tag |
TABLE |
Tag <table> |
static final HTML.Tag |
TD |
Tag <td> |
static final HTML.Tag |
TEXTAREA |
Tag <textarea> |
static final HTML.Tag |
TH |
Tag <th> |
static final HTML.Tag |
TITLE |
Tag <title> |
static final HTML.Tag |
TR |
Tag <tr> |
static final HTML.Tag |
TT |
Tag <tt> |
static final HTML.Tag |
U |
Tag <u> |
static final HTML.Tag |
UL |
Tag <ul> |
static final HTML.Tag |
VAR |
Tag <var> |
Constructor Summary
Modifier | Constructor | Description |
---|---|---|
protected |
Creates a new Tag with the specified id , and with causesBreak and isBlock set to false . |
|
protected |
Creates a new Tag with the specified id ; causesBreak and isBlock are defined by the user. |
Method Summary
Modifier and Type | Method | Description |
---|---|---|
boolean |
breaksFlow() |
Returns true if this tag causes a line break to the flow of data, otherwise returns false . |
boolean |
isBlock() |
Returns true if this tag is a block tag, which is a tag used to add structure to a document. |
boolean |
isPreformatted() |
Returns true if this tag is pre-formatted, which is true if the tag is either PRE or TEXTAREA . |
String |
toString() |
Returns the string representation of the tag. |
Field Details
A
public static final HTML.Tag A
ADDRESS
public static final HTML.Tag ADDRESS
APPLET
public static final HTML.Tag APPLET
AREA
public static final HTML.Tag AREA
B
public static final HTML.Tag B
BASE
public static final HTML.Tag BASE
BASEFONT
public static final HTML.Tag BASEFONT
BIG
public static final HTML.Tag BIG
BLOCKQUOTE
public static final HTML.Tag BLOCKQUOTE
BODY
public static final HTML.Tag BODY
BR
public static final HTML.Tag BR
CAPTION
public static final HTML.Tag CAPTION
CENTER
public static final HTML.Tag CENTER
CITE
public static final HTML.Tag CITE
CODE
public static final HTML.Tag CODE
DD
public static final HTML.Tag DD
DFN
public static final HTML.Tag DFN
DIR
public static final HTML.Tag DIR
DIV
public static final HTML.Tag DIV
DL
public static final HTML.Tag DL
DT
public static final HTML.Tag DT
EM
public static final HTML.Tag EM
FONT
public static final HTML.Tag FONT
FORM
public static final HTML.Tag FORM
FRAME
public static final HTML.Tag FRAME
FRAMESET
public static final HTML.Tag FRAMESET
H1
public static final HTML.Tag H1
H2
public static final HTML.Tag H2
H3
public static final HTML.Tag H3
H4
public static final HTML.Tag H4
H5
public static final HTML.Tag H5
H6
public static final HTML.Tag H6
HEAD
public static final HTML.Tag HEAD
HR
public static final HTML.Tag HR
HTML
public static final HTML.Tag HTML
I
public static final HTML.Tag I
IMG
public static final HTML.Tag IMG
INPUT
public static final HTML.Tag INPUT
ISINDEX
public static final HTML.Tag ISINDEX
KBD
public static final HTML.Tag KBD
LI
public static final HTML.Tag LI
LINK
public static final HTML.Tag LINK
MAP
public static final HTML.Tag MAP
MENU
public static final HTML.Tag MENU
META
public static final HTML.Tag META
NOFRAMES
public static final HTML.Tag NOFRAMES
OBJECT
public static final HTML.Tag OBJECT
OL
public static final HTML.Tag OL
OPTION
public static final HTML.Tag OPTION
P
public static final HTML.Tag P
PARAM
public static final HTML.Tag PARAM
PRE
public static final HTML.Tag PRE
SAMP
public static final HTML.Tag SAMP
SCRIPT
public static final HTML.Tag SCRIPT
SELECT
public static final HTML.Tag SELECT
SMALL
public static final HTML.Tag SMALL
SPAN
public static final HTML.Tag SPAN
STRIKE
public static final HTML.Tag STRIKE
S
public static final HTML.Tag S
STRONG
public static final HTML.Tag STRONG
STYLE
public static final HTML.Tag STYLE
SUB
public static final HTML.Tag SUB
SUP
public static final HTML.Tag SUP
TABLE
public static final HTML.Tag TABLE
TD
public static final HTML.Tag TD
TEXTAREA
public static final HTML.Tag TEXTAREA
TH
public static final HTML.Tag TH
TITLE
public static final HTML.Tag TITLE
TR
public static final HTML.Tag TR
TT
public static final HTML.Tag TT
U
public static final HTML.Tag U
UL
public static final HTML.Tag UL
VAR
public static final HTML.Tag VAR
IMPLIED
public static final HTML.Tag IMPLIED
This is a tag synthesized by the HTML reader. Since elements are identified by their tag type, we create a some fake tag types to mark the elements that were manufactured.
CONTENT
public static final HTML.Tag CONTENT
This is a tag synthesized by the HTML reader. Since elements are identified by their tag type, we create a some fake tag types to mark the elements that were manufactured.
COMMENT
public static final HTML.Tag COMMENT
This is a tag synthesized by the HTML reader. Since elements are identified by their tag type, we create a some fake tag types to mark the elements that were manufactured.
Constructor Details
Tag
public Tag()
- Since:
- 1.3
Tag
protected Tag(String id)
Tag
with the specified id
, and with causesBreak
and isBlock
set to false
.- Parameters:
-
id
- the id of the new tag
Tag
protected Tag(String id, boolean causesBreak, boolean isBlock)
Tag
with the specified id
; causesBreak
and isBlock
are defined by the user.- Parameters:
-
id
- the id of the new tag -
causesBreak
-true
if this tag causes a break to the flow of data -
isBlock
-true
if the tag is used to add structure to a document
Method Details
isBlock
public boolean isBlock()
true
if this tag is a block tag, which is a tag used to add structure to a document.- Returns:
-
true
if this tag is a block tag, otherwise returnsfalse
breaksFlow
public boolean breaksFlow()
true
if this tag causes a line break to the flow of data, otherwise returns false
.- Returns:
-
true
if this tag causes a line break to the flow of data, otherwise returnsfalse
isPreformatted
public boolean isPreformatted()
true
if this tag is pre-formatted, which is true if the tag is either PRE
or TEXTAREA
.- Returns:
-
true
if this tag is pre-formatted, otherwise returnsfalse
toString
public String toString()
© 1993, 2021, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/text/html/HTML.Tag.html