HTML Paragraphs

HTML Paragraphs

A paragraph is a block of text that always starts on a new line.

The HTML <p> element defines a paragraph.

A paragraph always starts on a new line, and browsers automatically add some white space (called a margin) before and after it.

<p>Your first  paragraph.</p>
<p>Your another paragraph.</p>

HTML Display

You can\’t know for sure how HTML will look.

Different things will happen if you change the size of your screen or window.

You can\’t change the way something looks in HTML by adding extra spaces or lines.

When the page is shown, the browser will automatically get rid of any extra spaces and lines:

<p>

This paragraph\’s

source code has

a lot of lines,

but the browser doesn\’t

care about them.
</p>

<p>This paragraph\’s

source code has

a lot of spaces between

the words, but

the browser doesn\’t care.
</p>

HTML Horizontal Rules

The <hr> tag creates a break in the theme of an HTML page. It is usually shown as a horizontal line.

The <hr> element is used to break up content on an HTML page or mark a change:

<h1>Your heading 1</h1>

<p>Your some text.</p>

<hr>

<h2>Your heading 2</h2>

<p>Your other text.</p>

<hr>

The <hr> tag is empty, which means that it doesn\’t have an end tag.

HTML Line Breaks

A line break is what the HTML <br> element does.

If you want a line break (a new line) but don\’t want to start a new paragraph, use <br>:

<p>Your<br> paragraph<br>with line breaks.</p>

 

The HTML tag <pre> Element

The HTML pre> element defines text that has already been set up.

Text inside a pre> element is shown in a fixed-width font (usually Courier), and spaces and line breaks are kept:

<pre>
Clouds lies over the sky.

Clouds lies over the sea.

Clouds lies over the sky.

Oh, bring rainbow here.
</pre>

Reference to HTML Tags

The reference for the coderazaa tag has more information about HTML elements and their attributes.

 <p>

explains what a paragraph is

<hr>

Describes a change in the main idea of the content.

<br>

Adds just one line break.

<pre>

Describes text that has already been formatted.

Related Article
Introduction to HTML

HTML Introduction – Learn the Basics of HTML HTML is the starting point of web development. Every website you see Read more

What is HTML

What Is HTML – Complete Beginner Explanation HTML is the foundation of the web. Every website you visit, from simple Read more

HTML Basic Examples

HTML Basic Examples – Learn HTML by Practice The best way to learn HTML is by writing and testing simple Read more

HTML text Editors

HTML Text Editors – Learn How to Write HTML Code To write HTML code, you need a text editor. A Read more

HTML Tags

HTML Tags are the basic units used to create HTML elements.They define how content is displayed in a web browser. Read more

HTML Elements

HTML Elements are the building blocks of every web page.Each element defines a part of the webpage, such as headings, Read more

HTML Attributes

HTML Attributes provide additional information about HTML elements.They help control how elements behave, display, or store extra data. In this Read more

HTML Headings

HTML Headings are used to define titles and subtitles on a web page.They help organize content and improve readability for Read more