HTML paragraph tag HTML paragraph tag

After the heading tags let's move to the paragraph tag in HTML. Majority of the content you will be adding to your webpage will be in the form of paragraphs. The browser does not follow the normal rules of English as followed by other software like Notepad and word editors. Browsers do not understand enter keys on your keyboard. By this we mean that when adding content to your webpage if you write some text in a paragraph, hit enter and start another paragraph the browser will not show you two different paragraphs in the final output. The only way to make the browser understand the beginning and end of each paragraph is to write your content inside the <p> tag. You can write multiple lines of text inside the <p> tag and create as many paragraphs as you want by using multiple <p> tags. Look at the sample code below

<html>        
    <head>      
    </head>        

    <body>            
        <p> This is paragraph 1. It has been written inside the paragraph tags. 
There is an enter pressed before this line but you will not be able to see a new paragraph inside the browser. 
Only when the p tag will end you will notice the end of the paragraph                      
        </p>            
        <p> This is paragraph 2. 
It has been written after closing the previous paragraph tags and starting new tags.              
        </p>            
    </body>    
</html>

When you see the output of the above HTML in the browser this is what you will see.

Image
 
Notice how the browser understands the beginning and end of a paragraph using <p> and </p> tags and not by the enter key.

You should not write large text content outside the <p> tags. Writing large paragraphs of text directly inside the <div>, <table> or <span> tags is a wrong practice.

 

Need Learning Guidence?
Join our Study Groups and get step by step guidence.
Learn HTML and CSS
The goal of creating this study group is to help students who are beginners to HTML and CSS program
7
Members
1
Questions Asked
0
Tasks Added
Learn Website Development
This goal of this study group is to help students learn the basics of website development using HTM
1
Members
0
Questions Asked
0
Tasks Added
Website Development Interview Preparation
This goal of this study group is to help students prepare for their website development interviews.
1
Members
0
Questions Asked
0
Tasks Added
Web Wars 1.0 - Build Your Digital CV
The goal of this study group is to manage all the communication for the 'Web Wars 1.0 - Build Your
110
Members
0
Questions Asked
0
Tasks Added

Quick Links

E-Magazines

@

Total Followers
Study Group Created
Study Group Joined
Following Teacher
Following Organization
Blog Articles Added
Questions Asked
Questions Answered
Jobs Posted
Total Members in Group
Questions asked by members
Tasks added in this Group

Please wait..

Ok

Login to Open ESchool OR Create your account    Login   SignUp