HTML

[HTML] HTML/h1, h2, h3, h4, h5, h6, p/ title and paragraph

OOQ 2022. 8. 4. 08:46
728x90
SMALL

#Html

#h1, h2, h3, h4, h5, h6, p

HTML/h1, h2, h3, h4, h5, h6, p/ title and paragraph

title

The title consists of the tags h1, h2, h3, h4, h5, h6.
They are closely related to the structure of the document, so it's best to use them in order.

Paragraph

Paragraphs are made up of p tags.
Large spaces between paragraphs.
If you want a line break within a paragraph, use the br tag.

example 1

The basic shape of the title is bold, and the size varies depending on the level.
h4 and p have the same font size.

<!doctype html>
<html lang="en">
  <head>
  <meta charset="utf-8">
    <title>HTML</title>
  </head>
  <body>
    <h1>Heading 1</h1>
    <h2>Heading 2</h2>
    <h3>Heading 3</h3>
    <h4>Heading 4</h4>
    <h5>Heading 5</h5>
    <h6>Heading 6</h6>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean nec mollis nulla. Phasellus lacinia tempus mauris eu laoreet. Proin gravida velit dictum dui consequat malesuada.</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean nec mollis nulla. Phasellus lacinia tempus mauris eu laoreet. Proin gravida velit dictum dui consequat malesuada.</p>
  </body>
</html>

Markup Validation Service can check for grammatical errors and structure.

example 2

<!doctype html>
<html lang="en">
  <head>
  <meta charset="utf-8">
    <title>HTML</title>
  </head>
  <body>
    <h1>Heading 1</h1>
    <h2>Heading 2</h2>
    <h3>Heading 3</h3>
    <h3>Heading 3</h3>
    <h2>Heading 2</h2>
    <h3>Heading 3</h3>
    <h2>Heading 2</h2>
  </body>
</html>

example 3

This is an example of a line break with a br tag within a paragraph. The second paragraph has a paragraph break for me.

<!doctype html>
<html lang="en">
  <head>
  <meta charset="utf-8">
    <title>HTML</title>
  </head>
  <body>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean nec mollis nulla. Phasellus lacinia tempus mauris eu laoreet. Proin gravida velit dictum dui consequat malesuada.</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean nec mollis nulla.<br>Phasellus lacinia tempus mauris eu laoreet. Proin gravida velit dictum dui consequat malesuada.</p>
  </body>
</html>

No serial number in the title. However, you can use CSS to add a serial number.

728x90
LIST