The first lesson to teach adults how to write front-end: "Learning common HTML tags for beginners"

1. What is HTML?

HTML is called Hypertext Markup Language and is a markup language. It includes a series of tags. These tags can unify the document format on the network and connect scattered Internet resources into a logical whole. HTML text is descriptive text composed of HTML commands. HTML commands can describe text, graphics, animations, sounds, tables, links, etc.

2. Commonly used labels

1 is used more frequently.
<html></html> Create an HTML document
<head></head>. Set the document title and other information that is not displayed on the web page.
<body> </body>A simple HTML document with the most basic necessary elements.
<title></title>Set the title of the document.
<div></div>The most commonly used tag for code layout in HTML is div.
<p></p>Paragraph tag, P paragraph forced line break Tag element
<span></span> Tag element syntax and usage
<a href="链接地址"></a>Anchor text A Hyperlink tag
<ul> <li></li> <li></li> <li></li> </ul>Unordered list tag Syntax and structure
<ol> <li></li> <li></li> <li></li> </ol>Ordered list tag Syntax and structure
<img src="图片路径" width="175" height="47" alt="" />Image tag Table
<table><th><td></td></th><tr><td></td></tr></table>tag

2 And More
<h1></h1> The Biggest Title
<h2></h2>

<h6></h6>The Smallest Title
<b></b>Bold Label Element Tutorial
<strong></strong>Bold Label Element Tutorial

3. Classification of labels

1 block level element

1 When block-level elements are displayed in the browser, they usually start (and end) with a new line
2 You can set the width and height
3 You can wrap block-level elements, inline elements, and inline block elements
such as: div, p, h1, h2, ul ,li,table…

2 Inline elements, also known as inline elements

1 and its corresponding block elements, one next to another, are displayed in the same line in order from left to right, and do not occupy a separate line.
2 The width and height cannot be set.
For example: span, b, a, strong...

3 Inline block elements

1. Can stay in the same line with other elements
2. Can set the width and height.
For example: Img,

Guess you like

Origin blog.csdn.net/qq_37617413/article/details/106459876