Basic HTML

Advance HTML

HTML Tags Reference

HTML Code Generator

HTML Resource

HTML Attributes

Definition and Usage

HTML tags contain have one or more attributes are support.

HTML Attributes are added in tag to provide the more additional information about how the tag should be appear or behavior.

HTML Attributes are always specified in the start tag.

HTML Attributes consist on name/value pairs like: i.e. name="value" and separated by an equals (=) sign.

Attribute values always be enclosed in double/single quotes.

Double quotes are the most common use, but single quotes are also allowed.

HTML Attributes Reference (Global Attributes)

Many attributes are in HTML elements, some are common attributes and others can only be used on certain tags.

Some of the more common attributes are:

Tag Value Description
id ID_Name Declared unique id for the element.
class Predefined_Class Used in Cascading Style Sheet (CSS).
style style_Attributes CSS code specifies inline the HTML element is presented.
title Title_Description Display on the "tooltip" for your elements.

Attributes is most cases they are optional. Many HTML elements assign a default value to it's attributes. Means if you don't include that attribute, a value will be assigned default attributes.


<title> HTML Attributes Example </title>
<style type="text/css">
#second { color:#FF9966; }
 <p style="background-color:red">First Attributes</p>
 <p id="second">Second Attributes</p>
 <p>Third Attributes</p>
 <p><abbr title="Cascading Style Sheet">CSS</abbr></p>
Online Try This Code Your Self....   »


First Attributes

Second Attributes

Third Attributes