com.h3c.util

## Class HTMLUtils.HTMLTag

- java.lang.Object
- - com.h3c.util.WebUtils.Tag
  - - com.h3c.util.HTMLUtils.HTMLTag

- Direct Known Subclasses:
    HTMLUtils.Body, HTMLUtils.Div, HTMLUtils.Head, HTMLUtils.Image, HTMLUtils.Link, HTMLUtils.Span
  Enclosing class:
    HTMLUtils

      public static class HTMLUtils.HTMLTag
      extends WebUtils.Tag

  Generic HTML tag.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HTMLUtils.HTMLTag(String name)` Creates a new HTML tag.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `HTMLUtils.HTMLTag` | `add(String content)` Adds an direct string content to this HTML tag.
    `HTMLUtils.HTMLTag` | `add(WebUtils.Tag tag)` Adds an HTML tag to this HTML tag.
    `HTMLUtils.HTMLTag` | `attr(String name, String value)` Adds an attribute to this HTML tag.

    - ### Methods inherited from class com.h3c.util.WebUtils.Tag

      `addCData, addContent, addContent, addContent, addContent, attr, hasContent, noShorthand, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### HTMLUtils.HTMLTag

          public HTMLUtils.HTMLTag(String name)

      Creates a new HTML tag.
      Parameters:
        `name` - HTML tag name

  - ### Method Detail

    - #### add

          public HTMLUtils.HTMLTag add(WebUtils.Tag tag)

      Adds an HTML tag to this HTML tag.
      Parameters:
        `tag` - HTML tag to be added
      Returns:
        this HTML tag

    - #### attr

          public HTMLUtils.HTMLTag attr(String name,
                               String value)

      Adds an attribute to this HTML tag.
      Parameters:
        `name` - attribute name
        `value` - attribute value
      Returns:
        this HTML tag

    - #### add

          public HTMLUtils.HTMLTag add(String content)

      Adds an direct string content to this HTML tag.
      Parameters:
        `content` - content to be added to this HTML tag
      Returns:
        this HTML tag

Copyright © 2014. All Rights Reserved.