Bold, italic & underlined text
Notes:
HTML b tag | HTML strong tag
HTML u tag | HTML ins tag
HTML i tag | HTML em tag
Text formatting tags:
As we know that HTML is a formatting language for web pages.
To format our web page content we use different tags.
HTML b tag: is a paired tag used to display the text in the bold format.
HTML strong tag: is a paired tag used to display the text in the bold format.
HTML i tag: is a paired tag used to display the text in the italic format.
HTML em tag: is a paired tag used to display the text in the italic format.
HTML u tag: is a paired tag used to display the text in the underlined format.
HTML ins tag: is a paired tag used to display the text in the underline format.
So you can use html strong tag in place of html b tag, html ins tag in place of html u tag and html em tag in place of html i tag.
Example code:
<html>
<head>
<title>HTML b, i, and u tags</title>
</head>
<body>
Hi <b>HTML!</b> <br/>
Hi <strong>HTML!</strong> <br/>
Hi <i>HTML!</i> <br/>
Hi <em>HTML!</em> <br/>
Hi <u>HTML!</u> <br/>
Hi <ins>HTML!</ins> <br/>
</body>
</html>
Interview Questions:
1. Instead of html b tag, which other html tag is used to display a text in bold ?
a. bold
b. strong
c. black
d. em
Answer: b
2. Which HTML tag is used alternative to html i tag?
a. strong
b. ins
c. em
d. italic
Answer: c