Style tags in HTML 5
1. <b>:- This tag is used to
display a text in bold in the HTML document.
Syntax:
<b>
Text you want to display in bold </b>
Code:
- <!DOCTYPE HTML>
- <html>
- <body>
- <p> I m
- <b> b </b> tag
- </p>
- </body>
- </html>
Output:
2. <i>:- This tag
is used to show text in italics in a document.
Syntax:
<i> Text you want to show in italics </i>
Code:
- <!DOCTYPE HTML>
- <html>
- <body>
- <p> I m
- <i> i </i> tag
- </p>
- </body>
- </html>
Output:
3. <pre>:- This tag
is used to set formatting in such a way, that the way
we write it, it will
display in the browser in the same format. It will also include white space if you have included it while writing text in this tag. It doesn't do word wrap.
Syntax:
<pre> A text you want to write which will display in same
format in
browser. </pre>
Join the conversation! Your thoughts help the community grow.