Class Alt

  • All Implemented Interfaces:
    TagBase, AreaAttributable, InputAttributable, java.io.Serializable, java.lang.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:
    Serialized Form
    • Constructor Detail

      • Alt

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

        public Alt​(java.lang.String value)
        Parameters:
        value - the coordinates value for the attribute
        Since:
        1.0.0
    • Method Detail

      • setValue

        public void setValue​(java.lang.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
      • getValue

        public java.lang.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