Lesson#2: Text Formatting in HTML

 Text formatting refers to the use of HTML tags to format the appearance of text in a webpage.

 Basics of text formatting

 specifying a page title

 the <title> </title> Tags are used to specify page title.

 The text between these tags is used to set the title to the page. It is displayed on the title bar of the web browser.

 For example, <title> First HTML Document </title> will display the text, First HTML Document, and the title bar of the web browser.

 

<html>
<head>
<title>
First HTML Document
</title>
</head>
</html>

 Creating a Paragraph

The <p></p> tags are used to define paragraph. HTML automatically adds an extra blank line before and after a paragraph.

 Line breaks

 The <br> tag is line break tag. It is used to end a line wherever it is placed it does not have a closing tag.

 Blank spaces

 Very often, spaces are needed in HTML documents. If the user inserts more than one space anywhere in a document, the browser will show only one space rest of the spaces will be truncated. If the user wants to have many spaces in HTML document then the &nbsp character entity must be used.

Leave a Reply

Your email address will not be published. Required fields are marked *