HTML5 tags and html5 tags
1. The main semantic tags added by h5 are as follows:
1. header and header
2. navigation to the nav page
3. atricle
4. section
5. aside sidebar
6. footer page bottom and footer
The PC is compatible with h5 new labels. Introduce js files on the page.
<Script type = "text/javascript" src = "// cdn.bootcss.com/html5shiv/r29/html5.js"> </script>
Ii. HTML5 New Form Control 1. New Type: web site email date and time, number of weeks, range, telephone color search
A. <label> url: </label> <input type = "url" name = "" required>
B. <label> email address: </label> <input type = "email" name = "" required>
C. <label> date: </label> <input type = "date" name = "">
D. <label> time: </label> <input type = "time" name = "">
E. <label> week: </label> <input type = "week" name = "">
F, <label> quantity: </label> <input type = "number" name = "">
G, <label> range: </label> <input type = "range" name = "">
H. <label> tel: </label> <input type = "tel" name = "">
I. <label> color: </label> <input type = "color" name = "">
J. <label> search: </label> <input type = "search" name = "">
2. added the attribute <input type = "text" placeholder = "Please enter the username" autofocus autocomplete = "off">
A. Set the default prompt text in the placeholder text box.
B. autofocus automatically obtains the focus
C. Set autocomplete to whether there is a Lenovo keyword drop-down. Generally, set it to "off" and turn it off, for example, autocomplete = "off"
3. Added audio and video tags for HTML5 audio and video videohtml5, and provided standard methods for inserting audio and video on the page. 1. supported formats of audio tags: ogg, wav, and mp3
Corresponding attributes:
A. autoplay automatic playback
B. controls display player
C. loop player
D. preload
E. Mute multed
For example: <audio src = "source/audioaudio" autoplay controls loop preload> </audio>
<Audio autoplay controls loop preload>
<Source src = "source/audio.wav" type = "">
<Source src = "source/audioworkflow" type = "">
</Audio>
The source tag is used to provide multiple media file addresses. If the file with one address is incompatible, the next address is used.
2. video tag formats: ogg, mp4, and webM
Corresponding attributes:
A. width
B. height
C. Poster
For example, <video src = "source/audio.mp3" autoplay controls loop preload width = "600" height = "400"> </video>
3. Select a third-party player.
A. cyberplayer
B. tencentPlayer
C. youkuPlayer