Paragraph in HTML

The p tag is used to make a paragraph in HTML. Any text written in this tag is rendered as a paragraph.

Paragraph in HTML

The <p> tag (paragraph tag) is used to make a paragraph in HTML. Any text written in this tag is rendered as a paragraph. It is one of the most common elements used in an HTML document.

<p>This is a paragraph.</p>

You can only use single space in a paragraph tag. Browsers will remove extra spaces found in the code.

<p>This is a pragraph with no extra spaces.</p> 
<p>This is a pragraph with      extra spaces.</p>

Output

This is a pragraph with no extra spaces.

This is a pragraph with extra spaces.

If you want extra spaces, use &nbsp;

<p>This is a pragraph with no extra spaces.</p> 
<p>This is a pragraph with &nbsp;&nbsp;&nbsp; extra spaces.</p>

Output

This is a pragraph with no extra spaces.

This is a pragraph with     extra spaces.


Share Tweet Send
Loading...
You've successfully subscribed to Geekinsta
Great! Next, complete checkout for full access to Geekinsta
Welcome back! You've successfully signed in
Success! Your account is fully activated, you now have access to all content.