HTML quick start personal learning experience

1. The use of sublime:

Plug-in installation:
Insert picture description here
shortcut code:
Insert picture description here
delete plug-in:
Insert picture description here

2. html tags

Insert picture description here
Label relationship:

Nested relationship and parallel relationship

<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>

Title tag
<h1> </h1> , <h2> </h2>,...,<h6></h6>

Paragraph tag
<p> </p>

Horizontal line label
<hr />

Wrap
<br />

span and div (div tag is equivalent to view tag in WeChat applet, it has no special meaning, it is used to divide)

The difference between span and div functions:

The difference between span and div is that div is a block-level element, and the elements it contains will wrap automatically. The span is an inline element, and it will not wrap before and after it.

Span has no structural meaning, it's just a simple application style. When other elements are not suitable, you can use the span element. A span can be a child element of a div, but a div cannot be a child element of a span. If a div appears in the span, it does not meet the ws3c page standard.

The difference between span and div:

The width of the span element is determined by the width of the enclosed content. It is not recommended to set the width attribute width for the span. You can set the margin value for the span and set the distance before the parent element.

A span can be converted into a block element through a css statement (display: block). If you want to set the style of the text or picture in a row, and do not need to wrap the line without affecting other content in other lines, span can solve this well. problem

Text formatting tags,
Insert picture description here
tag attributes,
Insert picture description here
Insert picture description here
image attributes,
Insert picture description here
link tags,
Insert picture description here
anchor point positioning: suitable for longer pages, we can click on a certain keyword to quickly reach this position on the page.

	<a href="#name1">点击此处</a>
	
	<h2 id="name1">跳转到的对应位置</h2>

The base tag
can set the overall link open state. For
example: the following figure is to make the tabs in the page open in a new window.
Insert picture description here
If you want a certain one to open in the current window, you can set special characters separately
Insert picture description here

Insert picture description here

3. Path

Insert picture description here

4. List

Unordered list
Insert picture description here
Note: It is agreed that only the li tag is placed in the ul tag, and other tags can be written in the li tag

Ordered list
Insert picture description here
custom list
Insert picture description here

5. Form

Insert picture description here
Note: The table tag can only put the tr tag (you can also put thead to wrap the table header and tbody to wrap the table body), put td (or th) in tr, and you can put it in td. HTML tables have no concept of columns.
Insert picture description here
Table attributes: (set to the table tag)
Insert picture description here
header tag,
just change td to th

Table title
caption, write to the table

Combine cells
Add attributes to the td tag: rowspan="the number you want to merge" to merge across rows; colspan="the number to merge" to merge across columns.
Interrow: delete the extra cell in each row, look from top to bottom, keep the first one.
Insert picture description here
Cross-column: Look from left to right, delete extra cells and keep the first one.
Insert picture description here
Insert picture description here

6. Form

Insert picture description here
Form control

Input
Insert picture description here
single choice: If it is a group, it can be achieved by setting the same name

The label label
Insert picture description here
Insert picture description here
textarea control (text area)
Insert picture description here
generally controls its width and height through CSS, and does not use the above attributes.

Drop-down menu
Insert picture description here
form field
Insert picture description here

7 、 HTML5

Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Recommendation: First upload to a video software such as Youku and Tencent. After sharing, just copy the code.

Insert picture description here
loop = -1 for infinite loop

Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
End~

Guess you like

Origin blog.csdn.net/zcylxzyh/article/details/113057699