Category: 11. HTML Attribute Reference

  • HTML draggable Attribute

    The HTML draggable attribute is an enumerated attribute and specifies whether the element is draggable or not (either with native browser behavior or the HTML Drag and Drop API). This attribute is commonly used in the drag and drop operations. Images and links are draggable by default. For other elements, you must set the ondragstart event. You…

  • HTML download Attribute

    The HTML download attribute specifies that the target will be downloaded when clicking on the hyperlink. It is used only if the href attribute is set. The value of the attribute is the name of the downloaded file. The browser automatically identifies the correct file extension and adds it to the file (e.g., .img, .txt, .pdf,). The browser will…

  • HTML disabled Attribute

    The HTML disabled attribute is a boolean attribute and specifies that the element must be disabled. This attribute can be used to prevent using the element until some condition has been met, such as selecting a checkbox. When present, the element does not respond to user actions and cannot be focused. Then, it is possible to make…

  • HTML coords Attribute

    The HTML coords attribute specifies the coordinates of an area in the image-map. To specify the shape, size, and placement of an area, it is used with the shape attribute. You can use this attribute on the <area> element. The top-left corner of an area has the 0,0 coordinates. The coords attribute can have the following values: x1, y1, x2, y2. It specifies…

  • HTML controls Attribute

    The HTML controls attribute is a boolean attribute and specifies that the audio/video controls must be displayed. It is new in HTML5. You can use the controls attribute on the following elements: <audio> and <video>. For the <audio> tag, the controls attribute includes: Play Pause Seeking Volume For the <video> tag, the controls attribute includes: Play Pause Seeking Volume Fullscreen toggle Captions/Subtitles Track Syntax Example of the HTML controls attribute used…

  • HTML contenteditable Attribute

    The HTML contenteditable attribute is used to specify whether or not the content of an element is editable. You can use this attribute on any HTML element. It is a part of the Global Attributes. The contenteditable attribute can have two values: true (the content is editable) or false (the content is not editable). If this attribute is not set…

  • HTML content Attribute

    The HTML content attribute gives a value that is associated with the http-equiv or name attribute. You can only use this attribute on the <meta> element to set the meta information in an HTML document. Syntax Example of the HTML content attribute:

  • HTML accept Attribute

    The HTML accept attribute specifies the type of file that the server accepts. The submission is possible through a file upload. You can only use this attribute on the <input> element. It is only used with <input type=”file”>. The accept attribute must not be used as a validation tool. File uploads must be validated on the server. Syntax Example of the HTML accept attribute:

  • HTML async Attribute

    The async attribute is a boolean attribute and specifies that the script will be executed asynchronously once it is available. It only works for external scripts and must be used only when the src attribute is present. You can use the async attribute on the <script> element. An external script can be executed in the following ways: When async is present, the script…

  • HTML alt Attribute

    The HTML alt attribute is used in HTML and XHTML documents. It specifies an alternative text which must be rendered if the element cannot be displayed for some reason. The alt attribute can also be used by screen readers to allow visually impaired users to interact with a webpage. To be accessible, an image must have an alt attribute. However, it…