




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





1.1 In essence, a paragraph is a group of words and punctuation. It enables us to organise and present textual data clearly and understandably. A paragraph element is created using the HTML
tag. 1.2 Why Paragraph Tag In HTML, a paragraph is just a text block that is encapsulated in a
tag. The
tag aids in breaking up content into digestible chunks. It serves as the main component for enclosing text on a webpage that is intended to be seen as a separate paragraph. The
tag in HTML is used to define a paragraph of text. To make the text easier to read, browsers automatically add a margin (space) before and after each paragraph. By improving the text's overall appearance on the page, this spacing facilitates readers' interaction with the content. The layout and readability of your web content can be greatly enhanced by knowing how to use tagging effectively. Syntax of the Paragraph tag,
Write your paragraph text here.
Paragraph Example
About HTML
HTML stands for HyperText Markup Language. It is used to create web pages.
Each paragraph is written inside the <p> and </p> tags.
The Output is: 1.2 Key Points: Every paragraph needs to begin with
and end with
. A line break in browsers automatically follows every paragraph. Paragraphs can be styled with CSS (text colour, alignment, font size, etc.).HTML Line Break With Paragraph 1.3 The Break1.5 Key Points:
adds a single line break in text. The
tag doesn’t have a closing tag. Often used inside paragraphs, poems, or addresses. Example in poems:
Twinkle, twinkle, little star,
How I wonder what you are!
The tag is an empty tag , meaning it does not have a closing tag. The Output is:
1.6 Key Points: Between content sections, establishes a thematic break. It is frequently employed to divide subjects visually. You can use CSS (colour, width, thickness, and alignment) to style it. Styled Example:
This creates a blue horizontal line that is 60% wide and 3px thick.
2. HTML Style Element CSS (Cascading Style Sheets) can be added directly within an HTML document using the
Used for quick styling of a single element. Example:
This is an inline styled paragraph.
**Advantages:** Easy to apply to one element. **Disadvantages:** Not reusable. Hard to maintain if many styles are used. **External CSS** CSS is written in a **separate** .css **file** and linked using the **tag** in . Used for **styling multiple webpages** consistently.External CSS Example
This paragraph is styled using an external CSS file.
CSS file (styles.css) body { background-color: lightpink; } h1 { color: purple; } p { font-size: 18px; color: navy; } Advantages: One file can control styles for multiple pages. Easier to maintain and update. Disadvantages: Requires an external file (may take extra loading time).
HTML comments are not displayed in the browser, but they can help document your HTML source code. Syntax,
This is a paragraph.
3.1 Hide Content Comments can be used to hide content. This can be helpful if you hide content temporarily:
This is a paragraph.
3.2 Type of Comments I. Multi-line Comment
II. /*
Look at this cool image:
*/ III. Single Line Comment //
Look at this cool image:
//