HTML Phrase Tag
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 >w3wiki</ h1 > <!-- em tag is used in below paragraph--> < p >< em >w3wiki</ 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 = "w3wiki">GFG</abbr>
Example:
html
<!DOCTYPE html> < html > < body > < h1 >w3wiki</ h1 > <!-- abbr tag is used in below paragraph--> < p >< abbr title = "w3wiki" >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 >w3wiki</ h1 > <!-- acronym tag is used in below paragraph--> < p >< acronym >w3wiki</ 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 >w3wiki</ h1 > < p >w3wiki text decoration tag</ p > < bdo dir = "rtl" >w3wiki 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 >w3wiki</ h1 > <!-- q tag is used in below paragraph--> < p >< q >w3wiki</ 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 >w3wiki</ h1 > <!-- mark tag is used in below paragraph--> < p >< mark >w3wiki</ 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 >w3wiki</ h1 > <!-- strong tag is used in below paragraph--> < p >< strong >w3wiki</ 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 >w3wiki</ h1 > <!-- blockquote tag is used here--> < blockquote >w3wiki 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 >w3wiki</ h1 > <!-- code tag is used in below paragraph--> < p >< code >w3wiki 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 >w3wiki</ h1 > <!-- samp tag is used in below paragraph--> < p >< samp >w3wiki</ 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 >w3wiki</ h1 > <!-- html address tag is used here--> < address >w3wiki office, sector-142, Noida, India</ address > </ body > </ html > |
Output:
Supported Browsers:
- Google Chrome
- Internet Explorer
- Firefox
- Opera
- Safari
Contact Us