HTML Paragraphs (<p>)

0
8χλμ.

HTML paragraphs are defined by the <p> tag. They are used to group related sentences or text into a single block of text. Browsers typically add a blank line before and after a paragraph for better readability.

Basic Structure

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

Multiple Paragraphs

HTML
<p>This is the first paragraph.</p>
<p>This is the second paragraph.</p>

Important Points

  • Block-level element: A paragraph is a block-level element, meaning it starts on a new line and takes up the full width available.
  • No nesting: You cannot nest paragraphs within each other.
  • Line breaks: To create a line break within a paragraph, use the <br> tag. However, it's generally better to use multiple paragraphs for better structure.

Example with Headings and Paragraphs

HTML
<!DOCTYPE html>
<html>
<head>
  <title>Headings and Paragraphs</title>
</head>
<body>

<h1>This is a Main Heading</h1>

<p>This is the first paragraph under the main heading. It contains some text.</p>

<h2>Subheading 1</h2>

<p>This is the first paragraph under subheading 1.</p>
<p>This is the second paragraph under subheading 1.</p>

<h3>Subheading 1.1</h3>

<p>This is a paragraph under subheading 1.1.</p>

</body>
</html>
Αναζήτηση
Κατηγορίες
Διαβάζω περισσότερα
Politics
Ugandan Opposition Leader Bobi Wine Shot by Police During Thanksgiving Event
In a shocking turn of events today, Ugandan opposition leader Bobi Wine was shot in the leg...
από Mpatswe Francis 2024-09-03 19:50:37 1 23χλμ.
Technology
The Ten Commandments of Computer Ethics
The Ten Commandments of Computer Ethics were created by the Computer Ethics Institute to guide...
από ALAGAI AUGUSTEN 2024-07-16 17:02:40 0 11χλμ.
Technology
Scenarios of Computer Misuse and Their Effects on Society
Computer misuse can have widespread and serious impacts on society. It encompasses a wide range...
από ALAGAI AUGUSTEN 2024-07-13 07:42:14 0 10χλμ.
Computer Programming
HTML Tables: A Comprehensive Guide with Code Examples
HTML tables are used to structure data in a tabular format, making it easy to read and...
από HTML PROGRAMMING LANGUAGE 2024-09-06 01:22:14 0 12χλμ.
Εκπαίδευση
A MUST KNOW FOR A'LEVEL HISTORY STUDENTS
https://acrobat.adobe.com/id/urn:aaid:sc:EU:7c45002b-2e38-426f-a0b9-8447c474993b
από Landus Mumbere Expedito 2024-07-15 19:08:17 0 13χλμ.
Tebtalks https://forum.tebtalks.com