Class HtmlTag
java.lang.Object
guideme.web.html.HtmlNode
guideme.web.html.HtmlTag
An HTML element with attributes and children. Void elements such as
<img> are written without closing tag.-
Method Summary
Modifier and TypeMethodDescriptionappend(HtmlFragment fragment) @Nullable StringReturns the value of the attribute, or null if it isn't set or has no value.children()name()Returns the name of the HTML tag or an empty string for text nodes.Returns the HTML of this node and its descendants.setAttribute(String name, @Nullable String value) Sets an attribute.setClassName(String className) voidReplaces thestyleattribute with the given CSS properties.Returns the text of this node and its descendants, without markup.Methods inherited from class HtmlNode
escapeAttribute, escapeHtml, hasAttribute, setAttribute, setAttribute, tag, tag, tag, tag, text
-
Method Details
-
name
-
setName
-
attribute
-
setAttribute
-
setClassName
-
children
-
append
-
append
-
append
-
setStyles
-
outerHtml
-
textContent
Description copied from class:HtmlNodeReturns the text of this node and its descendants, without markup.- Specified by:
textContentin classHtmlNode- Returns:
- the text of this node and its descendants, without markup
-