Creating a Paragraph in HTML 5

To create a paragraph on a Web page, you need to use the <p> tag. The <p> tag marks the beginning of a paragraph, and the <p> tag marks its end. The web browser formats the text into a paragraph to fit into the width of the current page. Breaking the document into paragraphs provides an easy way of formatting the text.

Let’s do the following steps in to create a paragraph using the <p> tag:

Open a blank document in Notepad and add the code:


<!DOCTYPE html>
<head>
<title>Create  Paragraph on Web page </title>
</head>
<body>
    <p> This is an example of creating paragraphs on the web.</p>
    <p> The number of lines in a paragraph depends on the size of your browser window. 
        If you resize the browser window, the number of lines in this paragraph will change.</p>

</body>
</html> 

Save the document with the name of CreatingPragraph.html. and open the HTML document in browser.

This is an example of creating paragraphs on the web.

The number of lines in a paragraph depends on the size of your browser window. If you resize the browser window, the number of lines in this paragraph will change.

Note:  the end tag </p> is optional, as a paragraph automatically ends when you start another paragraph.