All Implemented Interfaces:
TagBase, AAttributable, AreaAttributable, BaseAttributable, LinkAttributable, Serializable, Cloneable

This was the single required attribute for anchors defining a hypertext source link, but is no longer required in HTML5. Omitting this attribute creates a placeholder link. The href attribute indicates the link target, either a URL or a URL fragment. A URL fragment is a name preceded by a hash mark (#), which specifies an internal target location (an ID) within the current document. URLs are not restricted to Web (HTTP)-based documents. URLs might use any protocol supported by the browser. For example, file, ftp, and mailto work in most user agents.
Since:
1.0.0
See Also:
  • Constructor Details

    • Href

      public Href(String url)
      This was the single required attribute for anchors defining a hypertext source link, but is no longer required in HTML5. Omitting this attribute creates a placeholder link. The href attribute indicates the link target, either a URL or a URL fragment. A URL fragment is a name preceded by a hash mark (#), which specifies an internal target location (an ID) within the current document. URLs are not restricted to Web (HTTP)-based documents. URLs might use any protocol supported by the browser. For example, file, ftp, and mailto work in most user agents.
      Parameters:
      url - the url.
      Since:
      1.0.0
  • Method Details

    • setValue

      public void setValue(String url)
      sets the value for this attribute
      Parameters:
      url - the url.
      Since:
      1.0.0
    • getValue

      public String getValue()
      gets the value of this attribute
      Returns:
      the url.
      Since:
      1.0.0
    • init

      protected void init()
      invokes only once per object
      Since:
      1.0.0