How to emphasize text in a document using HTML5 ?
Last Updated :
29 May, 2020
In this article, we will emphasize the text in an HTML document by using the <em> element in the document. It is a phrase tag and used to emphasize the text content.
Syntax:
<em> Contents... </em>
Example 1:
<!DOCTYPE html>
< html >
< head >
< title >
Emphasize text in
an HTML document
</ title >
</ head >
< body >
< h1 >GeeksforGeeks</ h1 >
< h2 >
HTML5: How to emphasize
text in an HTML document?
</ h2 >
< em >Emphasized text content</ em >
</ body >
</ html >
|
Output:
Example 2:
<!DOCTYPE html>
< html >
< head >
< meta http-equiv = "Content-Type"
content="text/html;
charset = iso -8859-1">
< title >
HTML5: How to emphasize
text in an HTML document?
</ title >
</ head >
< body >
< h1 >GeeksForGeeks</ h1 >
< h2 >
HTML5: How to emphasize
text in an HTML document
</ h2 >
< strong >
< em >HTML CSS Exercise</ em >
</ strong >
</ body >
</ html >
|
Output:
Supported Browsers:
- Google Chrome
- Internet Explorer
- Firefox
- Opera
- Safari
Share your thoughts in the comments
Please Login to comment...