tumblr hit counter

The Class Attribute

Monday, October 14, 2013

The class attribute is used to associate an element with a style sheet, and specifies the class of element. We learn more about the use of the class attribute when we will learn Casecading Style Sheet (CSS). So for now we can avoid it.

The value of the attribute may also be a space-separated list of class names. For example:
class="yourClass1 yourClass2 yourClass3"
The style Attribute:
The style attribute allows we to specify CSS rules within the element. For example:
<p style="font-family:arial; color:#FF0000;">Your text...</p>  
Internationalization Attributes:
There are three internationalization attributes, which are available to most (although not all) XHTML elements.
  • dir
  • lang
  • xml:lang
The dir attribute allows we to indicate to the browser the direction in which the text should flow.The dir attribute can take one of two values, as we can see in the table that follows:


Value  Meaning
ltr The default value (left to right)
rtl  The default value (right to left). Arabic language start from right side.
Example:
<html dir=rtl>
<head>
<title>Website Title</title>
</head>
<body>Write something and check on your browser.</body>
</html> 
When we used dir attribute within the HTML tag, it determines how text will be present within the entire SITE or DOC. When we used within other tag, it change the text's position for just the content of that tag.


Page >> 1 2 3 4 5 6 7 8 9 10 11 12 13 14

No comments:

Post a Comment

 

Click Here to Start Learning

Get Update!

Join Us Now !
Enter your email address:

Note: Don't forget to click the confirmation link (in your email) to verify Your Entry!

LEARN WEB DESIGN