Technology Sharing

HTML - Common Tags

2024-07-12

한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina

 HTMLLabel

  1. Structure Description

       · Tags by<>/, English words or letters

       · Label<>English words or letters wrapped inTag Name

  2. Label Type

     · Common tags consist of two parts, calledDouble labelThe first part is called the start tag, the second part is called the end tag, and the content between the two parts (such as<head><body><title>wait

       · A few tags consist of a part, calledSingle labelSelf-contained and unable to contain (e.g.<br/><hr/>

HTMLRelationship between tags

  1. Nested relationships (parent-child relationships)

  2. Parallel relationship (brother relationship)

 <title>Label

<title>My first web page</title>

Title Tag

<h1>First level heading</h1>

<h2>Secondary heading</h2>

<h3>Level 3 heading</h3>

<h4>Level 4 heading</h4>

<h5>fiveLevel heading</h5>

<h6>Level 6 heading/h6>

  Paragraph Tags

 <p>…</p>

eg:

<h1>Beijing welcomes you</h1>

<p>Beijing welcomes you, anyone with a dream is great!</p>

<p>Where there is courage there will be miracles.</p>

Line break tags 

 <br/>

eg:

<h1>Beijing welcomes you</h1>

<p>

  Beijing welcomes you, anyone with a dream is great!<br />

  Where there is courage there will be miracles.<br />

  Beijing welcomes you and creates a new world for you<br />

  ……

</p>

Horizontal line label

 <hr/>

eg:

<h1>Beijing welcomes you</h1>

<hr/>

<p>

  Beijing welcomes you, anyone with a dream is great!<br />

  Where there is courage there will be miracles.<br />

  Beijing welcomes you and creates a new world for you<br />

  ……

</p>

Commonly used semantic layout tags in development

<div>Label

Block elements, occupying a single line, have nothing to do with the content

<span>Label</span>

1、 Inline elements, The default width is only related to the content. If it fills up a line, it will automatically wrap.
2. Make some words or phrases stand out

 Block elements can contain inline elements.Inline elements cannot contain block elements, can only contain text or other inline elements