1. A label

A Usage of labels

Properties: href, target, Download, ref=noopener

A Functions of labels

Jump to an external page, to an internal anchor point, to a mailbox or phone

1. Href value of a

(1) Website:

google.com

google.com

//google.com

(2) Path

/ a/b/c and the a/b/c

Index.html and. / index. HTML

(3) Pseudo agreement

JavaScript:;

Mailto: email

Tel: Mobile phone number

(4) id

href=#xxx

< a href = "# XXX" > < / a > to XXXCopy the code

2. The value of A’s target

(1) The value of target

_blank opens in a new TAB

_top is opened at the top level in combination with iframe

_parent is turned on in conjunction with iframe at the previous layer

_self with iframe open on the side

(Iframe has a built-in window, only some older browsers still use it)

(2) Naming of programmers

The name of the window

The name of the iframe

3. A download

(1) Function

Download pages, not open pages

(2) Problems

Not all browsers support it, especially mobile browsers

2. The table tag

1. Related labels

Table, thead, tbody, tfoot, TR, th, TD

Tr (Table row), TH (Table header), TD (Table data)

2. Relevant styles

(1) table-layout :(fixed; Auto)

Auto changes the width of the table cells based on the number of words in the title

Fixed will change the width of the table cell regardless of the number of words in the title

(2) border-collapse :(collapse)

(3) border-spacing :(0)

Put a border around the table and then join it together with no gaps in the middle

3. The img tags

(1) Function: send a GET request to show a picture

(2) Attributes:

Alt: Images do not load out, instead of text content

Height: The height of the picture

Width: indicates the width of the picture

SRC: the requested address of the image

(3) events

Onlaod load success call

Onerror load failed call

(4) Response formula

max-width : 100% ;
Copy the code

(5) Substitutable elements

Replaceable element

See MDN

4. Form and input tags

1. The form tag

(1) Function: Send git or POST request and refresh the page

(2) Properties: Action, Method, Target, AutoComplete

(3) Event: onSubmit

2. Input tag

(1) Function: Let users input content

Type = button/text /password /checkbox/email/file/hidden/number

Other attributes: Name, Autofocus, Checked, Disabled, placeholder, Value

(3) Events: onchange, onFocus, onblur

(4) Validator: new feature of HTML5