The content attribute is set from the content (the HTML code) and you can set get it through the element.setAttribute() or element.getAttribute().Some content attributes, like readonly, disabled, required, are also called boolean attributes.
HTML Attribute: Specifies the source file for an audio element. alternate text for an image, if the image for some reason cannot be displayed. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. The following example specifies English as the language and United States as
In some situations, when the attribute value itself contains double quotes, it is necessary to use single quotes: Add a "tooltip" to the paragraph below with the text "About W3Schools". , . The table below lists all HTML attributes and what elements they can be used within: If you want to report an error, or if you want to make a suggestion, do not hesitate to send us an e-mail: W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. the page loads, Specifies the relationship between the current document and the linked
language of the Web page. Specifies the name of the form the element belongs to. information about an
This might come … Script to be run when an element's scrollbar is being scrolled, Script to be run when the user writes something in a search field (for
Attributes and events share a common syntax: they must be inserted as a list of space-separated items inside the star tag, after the element's name and preceded by a space. However, W3C recommends quotes in HTML, and demands quotes for
will not break if you change domain. indicate that another track would be more appropriate, Specifies that the script is executed when the page has finished parsing
list vs. vs. autocomplete. scripts), Specifies whether the