Go Back   Wiki NewForum > Career Forum > Tech Forum & Tutorial > HTML Forum & Tutorial

HTML Forum & Tutorial End-To-End Process HTML / XHTML / CSS

Reply
Views: 1212  
Thread Tools Rate Thread Display Modes
  #1  
Old 05-03-2009, 11:38 AM
welcomewiki welcomewiki is offline
Member
 
Join Date:
Dec 2008
Location:
India
Posts: 66,115
Default HTML Attributes

Attributes provide additional information about HTML elements.
HTML Attributes

  • HTML elements can have attributes
  • Attributes provide additional information about the element
  • Attributes are always specified in the start tag
  • Attributes come in name/value pairs like: name="value"
Attribute Example

HTML links are defined with the tag. The link address is provided as an attribute:



Example

This is a link

(You will learn about links in a later chapter of this tutorial)
Always Quote Attribute Values

Attribute values should always be enclosed in quotes.
Double style quotes are the most common, but single style quotes are also allowed.
In some rare situations, like when the attribute value itself contains quotes, it is necessary to use single quotes:
name='John "ShotGun" Nelson'
HTML Tip: Use Lowercase Attributes

Attribute names and attribute values are case-insensitive.
However, the World Wide Web Consortium (W3C) recommends lowercase attributes/attribute values in their HTML 4 recommendation
Newer versions of (X)HTML will demand lowercase attributes.
HTML Attributes Reference

A full list of legal attributes for each HTML element is listed in our:


Complete HTML Reference


Below is a list of some attributes that are standard for most HTML elements:


Attribute Value Description class class_rule or style_rule The class of the element id id_name A unique id for the element style style_definition An inline style definition title tooltip_text A text to display in a tool tip

Reply With Quote
Reply

New topics in HTML Forum & Tutorial

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump


Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2019, vBulletin Solutions, Inc.