Control text direction in HTML and CSS

Description

The following code shows how to control text direction.

Example


<!-- w w  w  .j a va2s.  c  o  m-->
<!DOCTYPE HTML>
<html>
<body>
This is left-to-right: <bdo dir="ltr">HTML is good</bdo>.
This is right-to-left: <bdo dir="rtl">HTML is good</bdo>.
</body>
</html>

Click to view the demo

The code above generates the following result.

Control text direction in HTML and CSS
Home »
  HTML CSS Tutorial »
    Text »
      HTML Text Tag
HTML CSS Tutorial HTML Text Tag
Apply style to a region of content in HTML ...
Control text direction in HTML and CSS
Create a line in HTML and CSS
Create definition terms in HTML and CSS
Make text bigger in HTML and CSS
Make text smaller in HTML and CSS
Mark Inserting Text in HTML and CSS
Mark text as Abbreviations in HTML and CSS
Mark text as Acronyms in HTML and CSS
Mark text as Definitions in HTML and CSS
Mark text as Inserted Text in HTML and CSS
Mark text as Keyboard Instructions in HTML ...
Mark text as Programming Variables in HTML ...
Mark text as Quotes in HTML and CSS
Mark text as Sample Program Output in HTML ...
Mark text as Short Quotations in HTML and C...
Mark text as Address in HTML and CSS
Mark text as bold in HTML and CSS
Mark text as citation in HTML and CSS
Mark text as code in HTML and CSS
Mark text as deleted in HTML and CSS
Mark text as emphatic stress in HTML and CS...
Mark text as italic in HTML and CSS
Mark text as long quotations in HTML and CS...
Mark text as strikethrough in HTML and CSS
Create Emphasis Using the strong Element in...
Mark text as underline in HTML and CSS
Mark text in HTML as deleted or inserted in...
Mark text to use monospaced font in HTML an...
Use pre tag to wrap program code in HTML an...
Use sup for superscript and sub for subscri...