Saturday, 11 March 2023

pre and bdo Tag in HTML

HTML <bdo> tag

HTML <bdo> tag stands for "bidirectional override" which is used to overrides the current/default text direction. This tag sets the direction of content within it to render on browser from left to right or right to left.

The <bdo> tag is useful for the languages which are written from right to left such as Arabic and Hebrew.

Syntax

  1. <bdo dir=" "> Content......</bdo>  

Following are some specifications about the <bdo> tag

DisplayInline
Start tag/End tagBoth start and End tag
Usagetextual

HTML pre tag

The HTML <pre> tag is used to specify pre formatted texts. Texts within <pre>.......</pre> tag is displayed in a fixed-width font. Usually it is displayed in Courier font. It maintains both space and line break.

It is widely used to display language examples e.g. Java, C#, C, C++ etc because it displays the code as it is typed.

Example:

<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
   <center>
  <pre>
          Sun    Mon   Tue   Thru   Fri   Sat
  1       2     3      4     5     6
  7       8      9     10    11    12
   </pre>
   <bdo dir="rtl">Rajneesh</bdo>
   <bdo dir="ltr">Rajneesh</bdo>
  </center>
</body>
</html>




 

No comments:

Post a Comment

Full Form of IT and ITes Industry

                                                 Full Form (IT and ITeS) ICT - Information Communication Technology IT - Information Tec...