Web front-end --- HTML language basic syntax and tags (day001)

HTML overview

HTML (HyperTxet Markup Language) is a hypertext language. Hypertext language means that the page can contain pictures and other content. HTML consists of many tags.

HTML language displays the content we need to display on the browser through the browser.

Basic HTML syntax

The basic format of html is as follows

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
	</body>
</html>


label

To learn HTML language, you must first learn the usage of tags.

The specific structure of the label is as follows:

1. <tag structure> tag content</ tag name> (This type of tag is called a closed tag, with a beginning and a tail. It is also called a double tag)

2. <tag name/> (this kind of tag is called self-closing tag. There is only one tail. It is also called single tag.)

3. Attributes of tags: tags can have attributes. The attributes further describe the display or use characteristics of the label. The format of the attribute: attribute name = "attribute value". The location of the attribute: <tag name attribute name = "attribute value" >xxx</ tag name>. Add multiple attributes: <tag name attribute name = "attribute value" attribute name = "attribute value" >xxx </tag name>.

<!DOCTYPE html>It is a declaration of the language used.

<head>It is a header tag, you can write other tags in the header tag.

<meta>It is a tag used to describe the attributes of HTML web pages. (It <meta charset="utf-8">is to set the web character set encoding.)

<link> Tags define the relationship between documents and external resources, and their most common use is to link style sheets.

<title>Tags are used to write page titles.

<body>It is the body of the webpage, and the content of the webpage is written in the body. If you want to change the properties of a web page, you can do it in the body.

<!--注释内容-->, This tag is used to write comments.

<h1>,<h2>....<h6>Title tag. (Note that the font size of h1 to h6 decreases in order)

<p></p>Paragraph tag. <p>The text in the tag will be on its own line by default, and there will be a space between paragraphs.

<br/>Line break label. As the name implies, it plays the role of line break. The cursor moves to the next line immediately, that is, there is no space between the previous line.

<ol><ol/>Ordered list. You can use the type attribute to change the characters used for sorting.

<ul><ul/>Unordered list. You can also use the type attribute to change or hide.

<li><li/>Row in the list

<a><a/>Hyperlink tag, HTML uses a hyperlink to connect to another document on the Internet. In layman's terms, it is to access other web resources through links.

Usage: <a href="http://www,baidu.com">or <a href="http://www,baidu.com" target="_slef" >(Note: When opening a hyperlink, the new window will cover the current window. But <a href="http://www,baidu.com" target="_blank">it will not cover the current window, but create a new window.)

Define the anchor point (used to quickly jump to the corresponding label in a longer web page):
<a name="锚点名称"></a>
Specify the anchor point for hyperlink jump:
<a href="#锚点名称"></a>

<img/>Image tag. As the name suggests, insert the image tag<imgsrc="/=路径/图片"width="宽度" height="高度" border="边框厚度" alt="图片不能正常显示时对图片的描述。"/>

Note: Examples of image links:

<body>
    <a href="http://www.baidu.com">
   		<img src="img/baidu.jpg" width="180" height="95" border="0"/>
    </a>请点打开百度
</body>
       

Commonly used special symbols transfer: 1. Less than <: <. 2. Greater than sign >:>. 3. Copyright (a small c in the upper right corner): ©. 4. Trademark (TM): &trade. 5. Space: . 6. Registered trademark (R): ®.

Author's contact information:
qq945677662
vxa2482466921
If there is an error, please help me to correct it. Let's communicate together.

Guess you like

Origin blog.csdn.net/qq_23998145/article/details/109168111