Examples of differences between HTML5 tags and HTML4 tags

Source: Internet
Author: User

Comments: HTML5 focuses on content and structure, but not on performance. HTML5 simplifies more declarations and labels. Below is a simple example of HTML5, you can refer to the following (1) concepts:

HTML5 focuses on content and structure rather than on Performance

<Header>
<Hgroup> navigation data </Header>
<Nav> menu </nav>
<Article>
<H1> title: HTML5 video tutorial
(2) Declaration and Tag:
HTML5 simplifies more declarations and labels, and provides detailed provisions on compatibility, abolishing some elements and adding some elements.
Introduction to HTML5 tag syntax and adding tags

1. Syntax Tag:

(1) the label of the ending character that cannot be written: area, basebr, col, command, Embed, hr, img, input, keygen, link, meta, param, source, Track, wbr
(2) Terminator labels can be omitted: li, dt, dd, p, rt, optgroup, option, Colgroup, thread, tbody, tr, td, th
(3) labels that can be completely omitted: html, head, body, colgroup, and tbody

2. Add tags:

<Article> mark and define an article
<Aside> mark and define the sidebar of the page content
<Audio> mark and define audio content
<Canvas> mark and define an image
<Command> mark and define a command button
<Datalist> mark to define a drop-down list
<Details> tag defines the details of an element
<Dialog> mark and define a dialog box (Session box)
<Embed> mark and define External Interactive Content or plug-ins
<Figure> the tag defines a set of media content and their titles. <footer> the tag defines the bottom of a page or area.
<Header> mark the header of a page or area
<Hgroup> mark the information about a block in the definition file.
<Keygen> mark a generated key value in the definition form
<Mark> mark defines the marked text.
<Meter> mark and define measurementwithin apredefinedrange
<Nav> mark and define the navigation link
<Output> mark to define some output types
<Progress> mark the process of defining a task
<Rp> the tag is used in Rubyannotations to tell browsers that do not support Ruby elements how to display
<Rt> description of the tag definition on rubyannotations
<Ruby> mark and define rubyannotations.
<Section> mark a region
<Source> mark and define media resources
<Time> mark to define a date/time
<Video> tag to define a video

Simple HTML5 example

The Code is as follows:
<! DOCTYPE html>
<Head>
<Meta charset = UTF-8>
<Title> bkJia Chinese HTML5 topic </title>
<Style type = "text/css" rel = "stylesheet">
Header, nav, article, footer {border: solid 1px #666; padding: 5px}
Header {width: 500px}
Nav {float: left; width: 60px; height: 200px}
Article {float: left; width: 428px; height: 200px}
Footer {clear: both; width: 500px}
</Style>
<Script type = "text/javascript">
Document. createElement ('Article ');
Document. createElement ('nav ');
Document. createElement ('header ');
</Script>
</Head>
<Body>
<Header>
<Hgroup> navigation data </Header>
<Nav> menu </nav>
<Article>
<H1> HTML5 video tutorial Release date: <time> </time>
<Time datetime = "2013-2-10"> spring festival </time>
<P> test content </p>
</Article>
<Footer>
<Address> address </address>
</Footer>
</Body>
</Html>

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.