Research/HTML

HTML_heading and paragraphs

RIEM 2023. 5. 2. 18:53

HTML Headings

<h1> means the most important heading. <h2> is less important than <h1>. <h3> is less important than <h2>. And so on.

 

Why Headings?

Search engines see headings which define the structure of the page with the basis of priorities. It also gives overview to human and people can decide whether they would read further or not.

Heading should be used only for defining a structure of a page not for bold and big text.

 

HTML Paragraphs

HTML Paragraphs

What does Paragraph means? Well, according to Etymonline, paragraf means a distinct part of writing or discourse relating to a particular point, also paragraph mark, the symbol used to mark commencement of a new section of writing.

 

In HTML, a paragraph is normally a block of text. You can define a paragraph element as <p>. As it is a block of text, it automatically add white margin before and after a paragraph.

 

<p title="John 'Machinegun' Boy'">Hi, I'm the paragraph</p>
<p title='Marry "Gunner" Man'>Hi, I'm the paragraph, too.</p>

 

<hr> Horizontal Rule

<hr> defines a thematic change in the content. It is displayed as a horizontal rule.

 

<p title="John 'Machinegun' Boy'">Hi, I'm the paragraph</p>
<hr>
<p title='Marry "Gunner" Man'>Hi, I'm the paragraph, too.</p>



 

<br> Line Breaks

With a HTML <br> element, you can put a line break.

<p title="John 'Machinegun' Boy'">Hi, I'm the paragraph</p>
<hr>
<br>
<br>
<p title='Marry "Gunner" Man'>Hi, I'm the paragraph, too.</p>

 

 

<pre> Preformatted text

You can use a <pre> element. It enables to display a fixed-width font and keep both space and line breaks.

<pre>
I want to write it down
like this.
Be cause this is m
y canvas.
</pre>

See? Basically, it shows directly as it is. Freedom!