Formatting the Text in HTML 5
In HTML, the text you enter in Notepad appears in its default format on the Web browser. You need to apply basic formatting, such as font-style, color, and size, to the text to give it a professional view. The basic idea behind text formatting is to make a Web page more attractive. You can make the text bold, italic, or underpinned depending on how you want to highlight the text on a Web page.
Making the Text Bold in HTML 5
In HTML the <b> tag is used to render the text in bold style. The text between the opening <b> tag and the closing </b> tag appears bold on the Web page. Let’s do the following steps to make the text bold:
<!DOCTYPE html>
<head>
<title>Making Text Bold </title>
</head>
<body>
<p>This is an example of making a text bold <br> <b> this text is bold</b></p>
</body>
</html>
Save the document with the name of MakingTextBold.html. Open the HTML document in browser, it look like this:
This is an example of making a text bold
this text is bold
Making The Text Italic in HTML 5
In HTML the <i> tag is used to render the text as italic. The text between the opening <i> tag and the closing </i> tag appears in italics on a Web page.
Let’s do the following steps to make the text italic:
<!DOCTYPE html>
<head>
<title>Making Text Italic </title>
</head>
<body>
<p>This is an example of making a text italic <br> <b> this text is italic</b></p>
</body>
</html>
Save the document with the name of MakingTextItalic.html. Open the HTML document in browser, it look like this:
This is an example of making a text bold
this text is bold