Menu

HTML TUTORIALS - HTML Attributes

HTML Attributes

ADVERTISEMENTS


<font face="arial" color="#CC0000">

ADVERTISEMENTS

The id Attribute:


<p id="html">This para explains what is HTML</p>
<p id="css">This para explains what is Casecading Style Sheet</p>

ADVERTISEMENTS

The title Attribute:

<h4 title="Hello HTML!">Titled Heading Tag Example</h4>

Titled Heading Tag Example

The class Attribute:


class="className1 className2 className3"

The style Attribute:


<p style="font-family:arial; color:#FF0000;">Some text...</p>

The dir Attribute:

ValueMeaning
ltrLeft to right (the default value)
rtlRight to left (for languages such as Hebrew or Arabic that are read right to left)


<html dir=rtl>
<head>
<title>Display Directions</title>
</head>
<body>
This is how IE 5 renders right-to-left directed text.
</body>
</html>

The lang Attribute:


<html lang=en>
<head>
<title>English Language Page</title>
</head>
<body>
This page is using English Language
</body>
</html>

The xml:lang Attribute:

AttributeOptionsFunction
alignright, left, centerHorizontally aligns tags
valigntop, middle, bottomVertically aligns tags within an HTML element.
bgcolornumeric, hexidecimal, RGB valuesPlaces a background color behind an element
backgroundURLPlaces an background image behind an element
idUser DefinedNames an element for use with Cascading Style Sheets.
classUser DefinedClassifies an element for use with Cascading Style Sheets.
widthNumeric ValueSpecifies the width of tables, images, or table cells.
heightNumeric ValueSpecifies the height of tables, images, or table cells.
titleUser Defined"Pop-up" title for your elements.