How to define important text using HTML5 ?
In this article, we define an important text by using the <strong> tag in HTML. It is the parsed tag and used to show the importance of the text. It reflects the text as bold.
Syntax:
<strong> Contents... </strong>
Example 1:
<!DOCTYPE html> < html > < head > < title > How to define important text in HTML? </ title > < style > body { text-align: center; } h1 { color: green; } </ style > </ head > < body > < h1 >w3wiki</ h1 > < h2 > How to define important text using HTML5? </ h2 > < strong > Welcome to w3wiki! </ strong > </ body > </ html > |
Output:
Example 2:
<!DOCTYPE html> < html > < head > < title > How to define important text in HTML? </ title > < style > body { text-align: center; } h1 { color: green; } .gfg { font-weight: bold; } </ style > </ head > < body > < h1 >w3wiki</ h1 > < h2 class = "gfg" > How to define important text using HTML5? </ h2 > < div class = "gfg" > Welcome to w3wiki! </ div > </ body > </ html > |
Output:
Supported Browsers:
- Google Chrome
- Internet Explorer
- Firefox
- Opera
- Safari