-
Hajipur, Bihar, 844101
Hajipur, Bihar, 844101
HTML5 Basics
HTML Introduction
HTML Editors
HTML Basic
HTML Elements
HTML Attributes
HTML Headings
HTML Paragraphs
HTML Styles
HTML Formatting
HTML Quotations
HTML Comments
HTML Styling and Design
HTML Links and Media
HTML Layout and Structure
HTML Tables
HTML Lists
HTML Block & Inline
HTML Div
HTML Classes
HTML Id
HTML Head
HTML Layout
HTML Responsive
HTML Computercode
HTML Semantics
HTML Forms
HTML Forms
HTML Form Attributes
HTML Form Elements
HTML Input Types
HTML Input Attributes
Input Form Attributes
HTML Graphics
HTML APIs
HTML Advanced Topics
In HTML, a paragraph is defined using the <p>
tag. It is used to display a block of text with spacing above and below.
<p>This is a paragraph.</p>
Browsers automatically add space before and after a paragraph to separate it from other elements.
<p>HTML is the standard markup language for creating web pages.</p>
<p>It is easy to learn and widely used.</p>
Each <p>
tag starts a new paragraph on the page.
You can create multiple paragraphs by writing multiple <p>
tags:
<p>Paragraph one: Introduction to HTML.</p>
<p>Paragraph two: HTML elements and attributes.</p>
Use the <br>
tag to break a line without starting a new paragraph.
<p>First line.<br>Second line in same paragraph.</p>
📌
<br>
is an empty element and does not require a closing tag.
HTML ignores extra spaces and line breaks. Even if you press Enter multiple times in the editor, the browser treats it as a single space.
<p>This is spaced.</p>
Output: This is spaced.
To control space/line breaks, use:
<br>
– line break
– non-breaking space
You can style paragraphs using the style
attribute:
<p style="color: blue; font-size: 18px;">Styled paragraph text.</p>
Q1. Write a basic paragraph using the <p>
tag.
Q2. Create two paragraphs describing HTML and CSS.
Q3. Insert a line break within a paragraph using <br>
.
Q4. Add inline style to a paragraph to change text color to green.
Q5. Create a paragraph with a font size of 20px using the style
attribute.
Q6. Display three paragraphs about your hobbies.
Q7. Add a paragraph that includes bold text using <strong>
.
Q8. Insert multiple spaces in a paragraph and observe the output.
Q9. Use
to add extra spacing in a sentence.
Q10. Create a paragraph with a line break and color it red.
HTML5 Basics
HTML Introduction
HTML Editors
HTML Basic
HTML Elements
HTML Attributes
HTML Headings
HTML Paragraphs
HTML Styles
HTML Formatting
HTML Quotations
HTML Comments
HTML Styling and Design
HTML Links and Media
HTML Layout and Structure
HTML Tables
HTML Lists
HTML Block & Inline
HTML Div
HTML Classes
HTML Id
HTML Head
HTML Layout
HTML Responsive
HTML Computercode
HTML Semantics
HTML Forms
HTML Forms
HTML Form Attributes
HTML Form Elements
HTML Input Types
HTML Input Attributes
Input Form Attributes
HTML Graphics
HTML APIs
HTML Advanced Topics