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 Posts
Introduction to HTML

HTML Introduction HTML is the most common language used to mark up Web pages. What does HTML mean? Hyper Text Read more

What is HTML

HTML stands for Hyper Text Markup Language, which is a programming language used to make web pages and web apps. Read more

HTML Basic Examples

In this chapter, we\'ll show you some simple examples of HTML code. Don\'t worry if we use tags that you Read more

HTML text Editors

Editors for HTML text HTML files are text files, so any text editor can be used to make them. Text Read more

HTML Tags

Learn HTML Tags HTML tags are kind of like keywords that tell a web browser how to format and show Read more

HTML Elements

Elements make up an HTML file. These elements are what make web pages and tell you what content is on Read more

HTML Attributes

Attribute in HTML Attributes in HTML are special words that tell you more about an element. Attributes change the way Read more

HTML Headings

Headings in HTML The <h1> to <h6> tags are used to set up headings in HTML. <h1> shows which heading Read more

Scroll to Top