HTML Paragraphs

HTML Paragraph is a block of text that starts in a new line. In HTML, <p> tag is used to define a paragraph.

Code

In the following code snippet, we define a paragraph with Hello World text.

ADVERTISEMENT

Examples

A Simple Paragraph Element

In the following example, we define a simple paragraph element in a HTML file.

index.html

Paragraph with CSS

In the following example, we define two paragraph elements in a HTML file, and define CSS for all paragraphs in the HTML file.

index.html