HTML and CSS Reference
In-Depth Information
By far, the most common form of the <html> tag is simply:
document head and body content
</html> The dir attribute
The dir attribute specifies in which direction the browser should render
text within the containing element. When 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 con-
tent of that tag.
By default, the value of this tag is ltr , indicating that text is presented
to the user left to right. Use the other value, rtl , to display text right
to left, for languages like Arabic and Hebrew. Of course, the results de-
pend on your content and the browser's support of HTML 4 or XHTML.
Netscape and Internet Explorer versions 4 and earlier ignore the dir at-
tribute. The HTML 4-compliant Internet Explorer versions 5 and 6 simply
right-justify ( dir=rtl ) the text, although if you look closely at Figure 3-2 ,
you'll notice that the browser moves the punctuation (the period) to the
other side of the sentence. Netscape 6 right-justified everything, includ-
ing the ending period, but versions 7 and 8 did not (yet another sign
that the browser wars are over):
<html dir=rtl>
<title>Display Directions</title>
This is how IE 6 renders right-to-left directed text.
Search WWH ::

Custom Search