Continue

 Internationalization Attributes

There are three internationalization attributes, which are available for most (although not all) XHTML elements.

dir

lang  

xml:lang


The dir Attribute

The dir attribute allows you to indicate to the browser about the direction in which the text should flow. The dir attribute can take one of two values, as you can see in the table that follows.

Value                                Meaning


Itr                    Left to right (the default value)

rtl                    Right to left (for languages such as Hebrew or                              Arabic that are read right to left)

Example

<!DOCTYPE html>

<html dir="rtl">

<head>

<title>Display Directions</title>

</head>

<body>

This is how IE 5 renders right-to-left directed text.

</body>

</html>

This will produce the following result:

This is how IE 5 renders right-to-left directed text.

 When dir attribute is used within the <html> tag, it determines how text will be presented within the entire document. When used within another tag, it controls the text's direction for just the content of that tag.

Comments

Popular Posts