html5 and css3 study notes

 

html5

HTML5 is the fifth revision of HTML, in October 2014 by the World Wide Web Consortium (W3C) standards completed.

HTML5 is designed to support multimedia on a mobile device . So the mainstream browsers support h5 (chorme, firefox, safari, opera) ie9 support h5 (selective support), but ie8 and below is not supported.

html5 changed how users interact and documents: canvas video, audio, for painting: Multimedia

html5 added other new features: semantic features, local storage features, web multimedia, 2D3D, special effects (transitions, animations)

h5 relatively h4: increases and delete, page structure, the code is more concise

 


 

Semantic properties

Add semantic tags

ie9 block elements will resolve to the row-level element, resulting in the height settings take effect, at this time only need to block-level elements to an element.

ie8 do not support semantic tags, can be solved by the following methods:

Method 1: Manually create a label:

<Script>
     / * manually create a label, the label type is a default line-level, to be converted into block-level * / 
    document.createElement ( "header" );
 </ Script>

Second way: introducing html5shiv.min.js achieve compatible

 


 

The new property

The new type attribute

E-mail - email: @ contains requirements and server address

Telephone - tel: pop-up numeric keypad on the mobile side, restrict users to enter numbers

Website - url: Verify can only enter a valid URL requirements include http: //

Number - number: numerical only (including a decimal point), the input of other character; max min value may be provided

Product Name - search: you can provide a more personalized input experience

Range - range

Color Picker - color

By Date:

time - minutes and seconds

data - date

datatime - most browsers do not support, safari support

datatime-local - date + time

month - the month

week - week

Other new properties

placeholder: Tips placeholder

autofocus: automatic gain focus

autocomplete: automatically. Open on-, off- closed. Use two conditions: 1, 2 has been successfully submitted, the current element must have a name attribute

required : Requirements must be entered

pattern: regular expression validation

multiple: multiple choice, generally used for uploading files and mailboxes fill

 

 

Guess you like

Origin www.cnblogs.com/chengl062/p/11320444.html