All Implemented Interfaces:
TagBase, AreaAttributable, InputAttributable, Serializable, Cloneable

public class Alt extends AbstractAttribute implements AreaAttributable, InputAttributable
alt attribute for the element. A text string alternative to display on browsers that do not display images. The text should be phrased so that it presents the user with the same kind of choice as the image would offer when displayed without the alternative text. In HTML4, this attribute is required, but may be the empty string (""). In HTML5, this attribute is required only if the href attribute is used.
Since:
1.0.0
See Also:
  • Constructor Details

    • Alt

      public Alt()
      Initializes with empty value
      Since:
      2.1.1
    • Alt

      public Alt(String value)
      Parameters:
      value - the coordinates value for the attribute
      Since:
      1.0.0
  • Method Details

    • setValue

      public void setValue(String value)
      sets the value for this attribute. Specifies an alternate text for the area. Required if the href attribute is present
      Parameters:
      value - the value for the attribute.
      Since:
      1.0.0
    • setValue

      public void setValue(boolean updateClient, String value)
      sets the value for this attribute
      Parameters:
      updateClient - true to update client browser page if it is available. The default value is true but it will be ignored if there is no client browser page.
      value - the value for the attribute.
      Since:
      2.1.15
    • getValue

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

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