New features of HTML5

Source: Internet
Author: User

1.HTML5 's statement

HTML5 's statement is <!doctype html> this time to go is the weird mode, HTML4 statement is very long. There is no need to worry about HTML5. Case is not differentiated, there is only consistency check

2. Add tags

2.1. Structure tag: Label for layout

<article>

2.2 New Multimedia Tags

<video><audio><source><canvas><embed> now we don't need to install plugins ourselves

2.3 New app Tag tags

3. Deleted tags

3.1 Elements of a purely expressive

Basefont,big,center,fint,s,strike,tt,u

3.2 The elements that have a negative impact on usability are not conducive to crawling, but can be used in the background.

Frame,frameset,noframes

4. Do an exercise for the above label. A page, including head, bottom, middle (divided to left and right)

Steps:

(1) First know their layout distribution, need to use the label has header, aside, section, Footer,nav, we first put our own layout needs to list out. and writes the data to the HTML.

<body>    

The structure of course is not coming out, because we did not add style, down we started for each part, add style.

(2) Set the color for the head setting style and set its width and height.

There are three methods of selector, using tag Selector  header{      height:199px;      Background: #339  }

(3) We set the style in the middle, the middle is divided into two pieces, the left and the right.

Left:

section{      height:600px;      Background: #900;      width:70%;      Float:left
}

Right

      aside{          width:28%;          height:600px;          Background: #936;          Float:right    }

(4) Finally we set the style to the bottom

footer{            height:100px;            margin-top:50px;            Background: #FCC;            Clear:both;            margin:10px            }

So the page, even if the setup is complete, you can see the basic frame of the page, and then beautify it, the top and middle, there is a certain distance, the middle and bottom a little distance, left and right a little distance. The basic settings are as follows

div{      margin:10px;      height:600px;      }

Now that all the settings have been completed, let's get down to each part and add content.

We still start with the head and the head is usually the navigation bar.

(1) The Code of the navigation bar is as follows

 <  nav     >  <  ul  >  home </ ul     >  <  ul  >  podcast </ ul     >  
< ul > forum </ ul > </ nav >

We set the position of the navigation bar, and the color style

  nav{      height:30px;      Background: #F66;      MARGIN-TOP:151PX      }

At this point the items are vertically drained, and we use CSS styles to change them to horizontal and set their color and height.

Nav ul li{          width:100px;          height:30px;          Float:left;
}

(2) The top menu is finished, followed by the middle, or in order from left to right.

We'll start by adding an article

< article >            < H2 > Dawn </h2>            <p>                Spring sleep does not feel Xiao < BR />            </ P > </ article >

Style

  article{          background: #F00;          margin:0 Auto;          width:300px;          Text-align:center;}

On the right side of the site is generally recommended, or news, using

<Hgroup>        <H3>Xxx</H3>        <H3>Xxx</H3>        <H3>Xxx</H3>        <H3>Xxx</H3>        <H3>Xxx</H3></Hgroup>

(3) Now to handle the bottom

 <Footer>      <P>This is the bottom</P>      <HR/>       <Small>Xxx</Small>       <Small>Xxx</Small>       <Small>Xxx</Small>       <Small>Xxx</Small>       <Metermin= "0"Max= "Ten"value= "6" Low= "3" High= "7"></Meter>       <HR/>       <ProgressMax= "+"value= "a"ID= "Pro"></Progress>    </Footer>

Working with Styles

    footer{            height:100px;            Background: #FCC;            Clear:both;            margin:10px            }

Now it's all done.

5, the Use of the dialog box dialog, the last few are, there is a question of the form of a reply

<Dialog><DT>Xxx:xxxx</DT><DD>Xxxx:xxxx</DD><DT>Ttt:eee</DT><DD>Ttt:xxxx</DD></Dialog>

6. degree of Use meter

<min= "0"  max= "Ten"  value= "6" low  = "3"  High= "7"></meter>

You can set the minimum, maximum, and low and high values, and if value exceeds the low or high value, the color of the strips becomes darker.

7. Use of the progress bar

<max= " +" value= " +" ID= "Pro"> </Progress>

I am using Google Chrome, some browsers may not support some styles.

New features of HTML5

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.