top of page
  • Writer's pictureDiamond Computing Inc.

Web Technology: HTML paragraphs

Animals have animal language, people have human language, and HTML has its own dialect. Today, Mr. Diamond started to learn the tag language of HTML together with HTML fans

HTML can split a document into several paragraphs.

Paragraphs are defined by the <P> tag.


​<p>Mr. Diamond appears in this paragraph </p>

<p>Miss CSS appeared in another paragraph</p>

Try writing the »

Note: The browser automatically adds blank lines before and after paragraphs.

(</p> is a block-level element)

Don't forget the closing tag

Even if you forget to use the end tag, most browsers will display the HTML correctly:


​<p>Mr. Diamond appears in this paragraph

<p>Miss CSS appeared in another paragraph

Try writing the »

The above example works fine in most browsers, but don't rely on it.Forgetting to use an end tag can lead to unexpected results and errors.

Note: In future HTML versions, it is not allowed to omit closing tags.

Another line of HTML

If you want to wrap a line (a new line) without generating a new paragraph, use the <br> tag:


​<p>Mr. Diamond <br>appears<br> in this paragraph </p>

Try writing the »

The <br /> element is an empty HTML element.Since closing the tag does not make any sense, it has no closing tag.

HTML publishing - Use alerts

We are not sure exactly how HTML will be displayed.The size of the screen, as well as adjustments to the window, can make a difference.

With HTML, you cannot change the effect of the output by adding extra Spaces or line breaks to the HTML code.

When the page is displayed, the browser removes excess Spaces and blank lines from the source code. All consecutive Spaces or empty lines are counted as a space. Note that all consecutive blank lines (newlines) in HTML code are also displayed as a space.

HTML tag reference manual

How about HTML is easier to understand than baby language, Mr. Diamond's explanation is slow and slow, and will continue next week…

bottom of page