Open In App

HTML Phrase Tag

Improve
Improve
Like Article
Like
Save
Share
Report

Phrase Tag: In HTML, phrase tag is used to indicate the structural meaning of a block of text. For example, abbr tag indicates that the phrase contained the abbreviation word. Some examples of phrase tags are abbr, strong, mark, . . . etc.
Emphasized Text: The em tag is used to emphasized the text and this tag displays the italic font in a browser. It simply means anything written within em tag is shown as emphasized Text. 
Syntax: 
 

<em> Text Content </em>

Example: 
 

HTML




<!DOCTYPE html>
<html>
    <body>
       
        <h1>GeeksforGeeks</h1>
         <!-- em tag is used in below paragraph-->
         
<p><em>GeeksforGeeks</em> emphasized tag</p>
 
 
    </body>
</html>                   


Output: 
 

Text Abbreviation: To abbreviate a text in HTML use abbr tag. Abbreviation of text written within opening and closing abbr tag. 
Syntax: 
 

<abbr title = "GeeksforGeeks">GFG</abbr>

Example: 
 

html




<!DOCTYPE html>
<html>
    <body>
       
        <h1>GeeksforGeeks</h1>
         <!-- abbr tag is used in below paragraph-->
         
<p><abbr title = "GeeksforGeeks">GFG</abbr>
                               abbreviation tag</p>
 
                                
    </body>
</html>                   


Output: 
 

Acronym Element This tag is used to indicate that the content is written inside the opening and closing acronym tag is an acronym. 
Syntax: 
 

<acronym> Text Content </acronym>

Example: 
 

html




<!DOCTYPE html>
<html>
    <body>
       
        <h1>GeeksforGeeks</h1>
         <!-- acronym tag is used in below paragraph-->
          
<p><acronym>GeeksforGeeks</acronym> acronym tag</p>
 
 
    </body>
</html>                   


Output: 
 

Text Direction: The bdo tag stands for Bi-directional Override. It is used to override the current text direction. Default text direction is from left to right. But it can override by using bdo tag. 
 

  • ltr: specifies text direction from left to right.
  • rtl: specifies text direction from right to left.
  • auto: In this tag, the browser figures out the text direction, based on the content (only recommended if the text direction is unknown).

Syntax: 
 

<bdo dir = "ltr/rtl/auto"> Text Content </bdo>

Example: 
 

HTML




<!DOCTYPE html>
<html>
    <body>
       
        <h1>GeeksforGeeks</h1>
       
         
<p>GeeksforGeeks text decoration tag</p>
 
 
        <bdo dir = "rtl">GeeksforGeeks text decoration tag</bdo>
         
    </body>
</html>                   


Output: 
 

Short Quotations: To add double quotes within a sentence use q tag. The content is written inside the opening and closing q tag will be printed in quotes. 
Syntax: 
 

<q> Text Content </q>

Example: 

html




<!DOCTYPE html>
<html>
    <body>
       
        <h1>GeeksforGeeks</h1>
         
         <!-- q tag is used in below paragraph-->
         
<p><q>GeeksforGeeks</q> quotation tag</p>
 
         
    </body>
</html>                   


Output: 
 

Marked Text: The content written within the open and close mark tag will display as a yellow mark. Basically, it works like a highlighter and it is used to highlight some words in a sentence. 
Syntax: 
<mark> Text Content </mark> 
Example: 
 

html




<!DOCTYPE html>
<html>
    <body>
       
        <h1>GeeksforGeeks</h1>
         
         <!-- mark tag is used in below paragraph-->
          
<p><mark>GeeksforGeeks</mark> mark tag</p>
 
         
    </body>
</html>                   


Output: 
 

Strong Text: The strong tag is used to show important words in a sentence. The content written within open and close strong tag will display as important word. 
Syntax: 
 

<strong> Text Content </strong>

Example: 

html




<!DOCTYPE html>
<html>
    <body>
       
        <h1>GeeksforGeeks</h1>
         
         <!-- strong tag is used in below paragraph-->
          
<p><strong>GeeksforGeeks</strong> strong tag</p>
 
         
    </body>
</html>                   


Output: 
 

Quoting Text: The blockquote tag is used in quotation sentence. It means the content written in between open and close blockquote tag will be considered as a quoting text. 
Syntax: 
 

<blockquote> Text Content </blockquote>

Example: 

html




<!DOCTYPE html>
<html>
    <body>
       
        <h1>GeeksforGeeks</h1>
         
         <!-- blockquote tag is used here-->
         <blockquote>GeeksforGeeks is a computer science
        portal where you can learn programming. It contains
        well written, well thought and well explained
        computer science and programming articles, quizzes
        and ...</blockquote>
         
         
    </body>
</html>                   


Output: 
 

Programming Code: To represent programming code in html code tag is used. The content written within opening and closing code tag is considered as programming code. 
Syntax: 
 

<code> Text Content </code>

Example: 

html




<!DOCTYPE html>
<html>
    <body>
       
        <h1>GeeksforGeeks</h1>
         
         <!-- code tag is used in below paragraph-->
          
<p><code>GeeksforGeeks Programming</code> code tag</p>
 
 
    </body>
</html>                   


Output: 
 

Program Output: The output of program written in samp tag. The content written within opening and closing samp tag will print the sample output. 
Syntax: 
 

<samp> Text Content </samp>

Example: 
 

html




<!DOCTYPE html>
<html>
    <body>
       
        <h1>GeeksforGeeks</h1>
         
         <!-- samp tag is used in below paragraph-->
          
<p><samp>GeeksforGeeks</samp> program output tag</p>
 
 
    </body>
</html>                   


Output: 
 

Address Text: The address tag is used to display the address in web browser. The content written within opening and closing address tag is considered as an address in HTML. 
Syntax: 
 

<address> Text Content </address>

Example: 

html




<!DOCTYPE html>
<html>
    <body>
       
        <h1>GeeksforGeeks</h1>
         
         <!-- html address tag is used here-->
         <address>GeeksforGeeks office,
                 sector-142, Noida,
                 India</address>
 
    </body>
</html>                   


Output: 
 

Supported Browsers: 

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari


Last Updated : 17 Mar, 2022
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads