HTML Element Attributes

Q

What Is an HTML Element Attribute?

✍: FYIcenter.com

A

An element attribute is a predefined property about this element. Element attributes allows you to provide additional information to the element. Most HTML elements have some common attributes. But many HTML elements have their own specific attributes.

Here are some good examples of element attributes:

  • <br/> - No attribute.
  • <script type="text/javascript"> - One attribute: "type".
  • <p class="sideNote"> - One attribute: "class".
  • <meta name="Author" content="FYICenter.com"/> - Two attributes: "name" and "content".
  • <img src="/fyi.gif" alt="FYI"/> - Two attributes: "src" and "alt".

 

Writing HTML Element Attributes

XHTML Element Name Case Sensitive

HTML Tag and Attribute Syntax

⇑⇑ HTML Tutorials

2024-04-07, 1364🔥, 0💬