/* related posts with thumb nails */

What are Attributes?:


Attributes: Attributes provide additional information about an element (tag). All the tags can have attributes. And these attributes are always specified in the start tag. The following are the characteristics of attributes. Attributes have default values
  • Attributes come in name/value pairs like: attribute-name="value"
  • There are some valueless attributes like ‘checked’ in <input> tag.
  • Some of the attributes are required in some of the tags. For example, ‘src’ attribute of <IMG> tag is mandatory.
  • Attribute names and attribute values are case-insensitive.
  • Below is a list of some attributes that are standard for most HTML elements (i.e. except for- base, head, html, meta, param, script, style, and title elements)  
Attribute
Value
Description
class
classname
Specifies a classname for an element
id
id
Specifies a unique id for an element
style
style_definition
Specifies an inline style for an element
title
tooltip_text 
Specifies extra information about an element
(displayed as a tool tip)


 Example: The following <FONT> tag uses ‘color’ and ‘size’ attributes.
<font color=’red’ size=8> Hello APOORVA </font>
Related Topics:

0 comments:

Post a Comment