Everything about HTML (i)

Source: Internet
Author: User
Tags browser cache

1, element: Refers to all the code from the start tag to the end tag

2. HTML Link:

Remove underline: text-decoration:none;

HREF attribute: Link to another document

Name property: Create a link within a document

<name= "Tips">Hello</a><   href = "#tips" > Skip to Hello </a >   

Target= "_self": Open on this page

Target= "_blank": Open on new page

Target= "Top": open on the outermost side of the press, meaning to open a new window in the new page

target= "Parent": when the current page has multiple layers, the parent page that hosts this page opens

3. Use of the form <table><tr><th><td>

In HTML5, the properties of a table may not be written in a table label, or in a style sheet.

Vertical alignment: Vertical-align property

Table Title: Caption

Table Margins: cellpading

Table spacing: cellspacing

Do not show Table borders: Remove the "border" property.

4. List

Unordered list: <ul type= "Disc,circle,suqare" >--solid circle, Hollow circle, block with sequence table: <ol type= "A,A;I.I;" /star= "Ten" >--uppercase and lowercase letters; roman; define numbers from several beginnings

Custom list:<dl><dt><dd>

5. Forms

Form: <form method= "Get/post" action= "Server file" ></form>

Control tag: <label for= "id value" ></label>

Input domain: <input type= "Text/password" id= "id value" name= "background get data corresponding" value= "pre-displayed text" >

Text field: <textarea rows= "" cols= "" ></textarea>

Drop-down list box:

 <  slecet     >  <  option  value  = "Commit value"   select  = "Selected"     >  <  option  value  = "Commit value"     >  <  option  value  = "Commit value"  >  </ select  >  

check box: <input type= "checkbox" >

Radio Box: <input type= "Radio" name= "#" >,name properties are the same, so that the options are grouped together to complete the radio

Button: <button type= "button" >click me!</button>

Submit/Reset button: <input type= "Submit/reset" value= "button display Name" >

Get/post: This standard answer reference from W3Schools

    • Get is harmless when the browser is rolled back, and post submits the request again.
    • Get generated URL address can be bookmark, and post is not available.
    • The GET request will be active by the browser cache, and post will not, unless manually set.
    • A GET request can only be URL-encoded, while post supports multiple encoding methods.
    • The GET request parameters are kept intact in the browser history, and the parameters in the post are not retained.
    • A GET request has a length limit for the parameters that are passed in the URL, and post does.
    • For data types of parameters, get accepts only ASCII characters, while Post has no restrictions.
    • Get is less secure than post, because parameters are directly exposed to URLs, so they cannot be used to pass sensitive information.
    • The get parameter is passed through the URL and the post is placed in the request body.

A different answer https://zhuanlan.zhihu.com/p/22536382

6, block element, inline (inline) element, inline block element

Block-level elements: ① exclusive row ② default 100% width ③ can set width, height, inside/outside margin

Inline element: ① a row with other inline elements ② the size of the element content ③ not set wide, high, inner/outer margins

<a>, <span><br><td>

Inline block elements: ① and inline or inline block elements line ② to set width \ height \ inner/outer margin

, <input>

7, center

Fixed width block element center: margin:0 Auto;

Indeterminate wide block Element center: ① added Table label, its width is determined by the content, and then with margin;

②dispaly:inline, then with Text-align;

③position:relative;left:50%;float:left;

inline element, inline block element: Set Text-align:center for its parent element;

PS: When Position:absolute or float:left/right appear, the display property of the element automatically becomes Inline-block

  

Everything about HTML (i)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.