Skip to content Skip to sidebar Skip to footer

How to Create Abbreviations and Change Text Direction in HTML

Various purposes in writing are already available in HTML in the form of elements with various uses. In this discussion, the material that will be discussed is about how to create abbreviations and change the direction of text in HTML.

For those of you who want to write abbreviations in HTML documents, you can use tag pairs …. which is used to explain the abbreviation of an abbreviation such as PMR, MPR, PMI, RI, and so on.

Next, you must be wondering about the usefulness of changing the direction of text in HTML. HTML is a global language. The text written in HTML documents is not only in English or Indonesian which is generally written from left to right but is also available for languages ​​with special characters written from right to left such as Arabic.

Therefore, HTML provides a special tag to change the direction of the text, namely the tag . For a more complete explanation, let’s see the explanation below:

A. Write abbreviations in HTML with the tag

The abbr element indicates an abbreviation which means an abbreviation or acronym such as PHP, HTML, HTTP, WWW, and so on where all these abbreviations must have an abbreviation. Tags used to describe the abbreviation of an abbreviation. Explaining an abbreviation stands for can provide useful information for web browsers, translators, readers and search engines.

Inside tags There are attributes, namely:

AttributeScoreFunction
Title stands for abbreviation Explain the abbreviation of the abbreviation and do not contain other information.

The abbreviation of an abbreviation in the title attribute will be visible in the browser if you hover your pointer or mouse over the abbr element (abbreviation).

The following is an example of the code for using the tag in HTML:

      Penulisan Singkatan di HTML      

DARPA mensposori perkembangan jaringan yang menggunakan IP,TCP, dan UDP.

After you run the code above in a web browser it will appear as shown below:

How to Create Abbreviations and Change Text Direction in HTML

If you point the pointer to an existing abbreviation, for example on IP, the abbreviation will appear as shown below:

abbreviation using hover tag tag

B. Changing the direction of text in HTML with the tag

The bdo element stands for Bi-Directional Override which is used to change the direction of the text that is currently in effect on an element in HTML. This tag belongs to the inline tag type and is also displayed following the existing text flow.

Inside tags There are attributes, namely:

AttributeScoreFunction
dirltr (left to right)Display text from left to right
rtl (right to left)Display text from right to left

The following is an example of writing code and using the tag in HTML:

   Merubah Arah Teks di HTML    

Contoh Teks :

Left to right example
Right to left example

After you run the code above in a web browser it will appear as shown below:

Use of bdo tag in html

From the picture above, you can see the results of using the tag with ltr (left to right) and rtl (right to left) values. The use of rtl (right to left) is rarely used in English and Indonesian because in general both languages ​​are written from left to right.

You now understand the function of the two tags? If so, make sure you continue to the next HTML material regarding the use of kbd, samp, code and var elements in HTML.

Post a Comment for "How to Create Abbreviations and Change Text Direction in HTML"