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. |
<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.

No comments:
Post a Comment