HTML <strong> Tag
Last Updated :
13 Dec, 2023
The HTML <strong> Tag is the parsed tag and is used to show the importance of the text. The content inside it is generally in bold format. The primary purpose of <strong> tag is to provide semantic meaning to the content, indicating its importance to both browsers and developers.
Note: This tag supports the global attributes and event attributes in HTML.
Syntax
<strong> Contents... </strong>
Example 1:Â This example illustrates the implementation of the HTML <strong> Tag.
HTML
<!DOCTYPE html>
< html >
< body >
< h1 >
GeeksforGeeks
</ h1 >
< h2 >
< strong > Tag
</ h2 >
< strong >
Welcome to geeksforGeeks!
</ strong >
</ body >
</ html >
|
Output:
Example 2: In this example, we will use CSS property to set bold font weight.
HTML
<!DOCTYPE html>
< html >
< head >
< title >strong Tag</ title >
< style >
body {
text-align: center;
}
h1 {
color: green;
}
.gfg {
font-weight: bold;
}
</ style >
</ head >
< body >
< h1 >
GeeksforGeeks
</ h1 >
< h2 >
font-weight: bold;
</ h2 >
< div class = "gfg" >
Welcome to geeksforGeeks!
</ div >
</ body >
</ html >
|
Output:
Supported Browsers
- Google Chrome 1 and above
- Edge 12 and above
- Firefox 1 and above
- Opera 15 and above
- Safari 4 and above
Â
Share your thoughts in the comments
Please Login to comment...