HTML CSS JAVASCRIPT PHP

HTML Paragraph


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


HTML Paragraphs

The HTML < p> element defines a paragraph.

A paragraph always start on a new line, and browsers automatically and some white apace ( a margin ) before and after a paragraph.

Example


HTML Display

You cannot be sure how HTML willbe displayed.

large og small screens and resize windows will create diffrent result.

with HTML you can not change the displaty by adding extra spaces or extra lines in your HTML code.

The browser will automatically remove any extra space and lines when the page is displayed.

Example


HTML Horizontal rules

The < hr> tag defines a thematic break in an HTML page and is most often displayed as a horizontal rule.

The < hr> element is used to separate content (or define a change ) in an HTML page.

Example

The < hr> tag is an empty tag which means that it has no end tag.


HTML line breaks.

The HTML < br> element defines a line break.

Use < br> if you want a line break ( a new line) without starting a new paragraph.

Example

The < br> tag is an empty tag which means that it has no end tag.


The poem problem

This poem will display on a single line.

Example


Solution The HTML < pre> element

The HTML < pre> element defines preformatted text.

The text inside a < pre> element is displayed in a fixed width fotn and it preserves both spaces and line breaks.

Example