Pages

Friday, December 17, 2010

The Bidirectional Override Element

The Bidirectional Override <bdo> element is used to reverse the direction of the text from its original direction.

Listed below are the most common attributes you can use for bidirectional element:
  • class - provides the class or classes of the heading. This attribute is used to identify the name of the style class or classes to be used for rendering.
  • dir - sets the direction of the text, such as "ltr" for left-to-right and "rtl" for the right-to-left.
  • id - provides a unique name for the heading.
  • lang - provides the language in which the enclosed content is coded.
  • style - provides a cascading style sheet (CSS) properties to the heading.
  • title - privides a text title for the heading. Most web browser displays the value of the title as "tooltip".

Here's an example on how to use the bidirectional element:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
         <meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
         <mate name="keywords" content="blog, web development" />
         <title>the BIDIRECTIONAL OVERRIDE element</title>
     </head>

     <body>
       <h1>
         the BIDIRECTIONAL OVERRIDE element
       </h1>
       <p>
         Why Noah didn't swat those two <bdo
dir="rtl">mosquitoes</bdo>?
       </p>
       <p>
         Who tastes the dog <bdo dir="rtl">food</bdo> when it has a "new and improved" flavor?
       </p>
    </body>
  </html>

Output of the Bidirectional Override element:

Why Noah didn't swat those two seotiuqsom?

Who tastes dog doof when it has a "new and improved" flavor?          

4 comments:

Anonymous said...

yeaahh!! i keep wondering about this trick now i know how to do it in codes..thanks a lot sharky

Anonymous said...

hi!! can you post about the citation element? thanks.

Unknown said...

cool dude!! i tried it and works...nice

sharky said...
This comment has been removed by the author.

Post a Comment