What Is an XHTML Element Attribute

Q

What Is an XHTML Element Attribute? - XHTML Tutorials - Introduction To Tag and Attribute Syntax

✍: 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 XHTML elements have some common attributes. But many XHTML 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".

2007-05-12, 4702👍, 0💬