Ten reasons for using HTML5 now,

Source: Internet
Author: User
Tags html header home screen

Ten reasons for using HTML5 now,

Haven't you considered using HTML5? Of course, I guess you may have your own reasons; it is not widely supported yet, it is not easy to use in IE, or you just like to write strict XHTML code. HTML5 is a major change in the Web development world. In fact, whether you like it or not, it represents the future trend. In fact, HTML5 is not difficult to understand and use. Here we can list the reasons why HTML5 is used now.

At present, there are many articles that describe HTML5 and introduce its advantages and benefits. With more such articles, Apple's support, Adobe's HTML5 product development, and the death of mobile flash, the support of so many websites, I want to say something to those who still don't or don't want to accept it. I think the main reason is that it looks like a mysterious thing. Many of them feel like a jet bag or a flying car. An unverified, extraordinary idea, but not practical. But in fact, it is very practical now.

To decrypt HTML5 and help stubborn developers, I have listed several reasons for using HTML5. I hope it will be helpful to you!

Tenth cause: ease of use

Two reasons make it easier to create a website using HTML5: semantics and Its ARIA. New HTML Tag ImageSo that readers can access the content more easily. In the past, even if you defined a class or ID, your readers could not understand what a div is. With the new semantic definition tag, you can better understand HTML documents and create a better user experience.

ARIA is a W3C standard used to specify "Roles" for elements in HTML documents and create important page terrain through role attributes, suchheader,footer,navigationOraritcleIt is necessary. This was ignored and not widely used, because it is not verified in fact. However, HTML5 will verify this property. At the same time, html5. these roles are built in and cannot be overwritten. For more information about HTML5 and ARIA, see here.

Ninth major cause: Video and Audio support

Forget flash and other third-party applications, and enable your video and audio to pass the HTML5 tag.<video>And<audio>To access resources. Playing media correctly has always been a terrible thing. You need to use<embed>And<object>Tags, and a large number of parameters must be assigned to them for correct playback. Your media tags will be very complex and confusing. Moreover, HTML5 video and audio tags basically regard them as images:<video src=""/>.

But what about other parameters, such as width and height, or automatic playback? Don't worry, just define it like other HTML tags:

<video src="url" width="640px" height="380px" autoplay/>。

In fact, this is a simple answer. However, our old browsers may not like HTML5. You need to add more code to make them work correctly.

However, this code is similar<embed>And<object>There are many simple answers.

<video poster="myvideo.jpg" controls> <source src="myvideo.m4v" type="video/mp4" /> <source src="myvideo.ogg" type="video/ogg" /> <embed src="/to/my/video/player"></embed></video>

Here are some resources worth looking:

The simplest way to use: HTML5 video

The eighth major reason: Doctype

That's right. It's doctype. There's no more. Is it a simple answer? There is no need to copy and paste a bunch of unintelligible code, and there are no additional head labels. The biggest good news is that in addition to simplicity, it can work properly in every browser, even the notorious IE6.

Seven major reasons: clearer code

If you have a preference for simple answer, elegant and easy band code, HTML5 is definitely something tailored for you. HTML5 allows you to write simple, clear, and descriptive code. Semantic-compliant code allows you to separate styles and content.

Let's take a look at this typical simple heaer code with navigation:

<div id="header"> 

Is it easy? However, using HTML5 makes the code simpler and meaningful:

With HTML5, you can use the HTML header tag of semantics to describe the content of your div and its class definition. Previously, you needed to use a large number of div to define the content area of each page, but use the new<section>,<article>,,<footer>,<aside>And<nav>Tags, you need to make your code clearer and easier to read.

HTML5 and future networks

Sixth reason: smarter Storage

The coolest feature in HTML5 is local storage. One thing is the integration of old technology cookies and client databases. It is easier to use than Coke because it supports multiple windows Storage and has better security and performance. It can be saved even after the browser is closed. Because it is a client database, you don't have to worry about deleting any cookies, and all mainstream browsers support them.

Local Storage is good in many cases. It is implemented by a third-party plug-in HTML5 tools. You can easily create some application features, such as saving user information, caching data, and loading the user's last application status.

Fifth reason: Better interaction

We all like better interaction, and we like dynamic websites with feedback from users. Users can enjoy the interaction process. Input<canvas>, HTML5 drawing Labels allow you to do more interaction and animation, just like what we achieve with Flash.

Besides<canvas>HTML5 also has many APIs that allow you to create more dynamic web applications with better user experience. Here is a list:

  • Drag and Drop (DnD)
  • Offline storage database
  • Browser history management
  • Document editing
  • Timed media playback
Fourth Reason: Game Development

Yes, you can use HTML5<canvas>Develop games. HTML5 provides a great mobile-friendly way to develop interesting interactive games. If you develop Flash games, you will enjoy HTML5 game development.

Script-tutorials currently provides four non-part HTML5 game development tutorials. Here, let's take a look at the interesting games they developed:

  • HTML5 Gaming Development Lesson One
  • HTML5 Gaming Development Lesson Two
  • HTML5 Gaming Development Lesson Three
  • HTML5 Gaming Development Lesson Four
The third major reason: Legacy and cross-browser support

Your modern popular browsers support HTML5 (Chrome, Firefox, Safari, IE9 and Opera), and have created all browsers such as HTML5 doctype, it can be used even if it is very old and very annoying for browsers like ie6. However, because the old browser can recognize doctype, it does not mean that it can process HTML5 labels and functions. Fortunately, HTML5 makes development easier and supports more browsers, so that the old IE browser can use new elements by adding javascript code:

<!--[if lt IE 9]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
  • HTML5 & CSS3 READINESS
  • When can I use
  • HTML5 Cross Browser Polyfills
  • Modernizr
The second reason: Mobile, mobile or mobile

You can call it intuition, but I think mobile technology will become more popular. I know, there are some crazy guesses here, and some may also come to your mind-Mobile is a fashion! Mobile devices will occupy the world. More mobile devices will grow rapidly. This means that more users will choose to use mobile devices to access websites or web applications. HTML5 is the most mobile development tool. As Adobe announces that it has abandoned mobile flash development, you will consider using HTML5 to develop webp applications.

When mobile browsers fully support HTML5, developing mobile projects will be as simple as designing smaller touch displays. There are many meta tags that allow you to optimize the movement:

Viewport: allows you to define viewport width and zoom settings full-screen browser: ISO-specified value allows Apple devices to display Home screen icons in full-screen mode: Just like a desktop favorites, these icons can be used to add to favorites the homepage of IOS and Android mobile devices.

  • Mobile HTML5
  • Mobile Boilerplate
  • HTML5 Mobile Web Applications
The first reason: it's the future. Let's get started!

The biggest reason is that you are starting to use HTML5 today because it is the future and should not be left behind! HTML5 will not develop in every direction, but more elements have been adopted by many companies and started development. HTML5 is actually more like HTML. It is not a new technology that requires you to learn again! If you develop XHTMLstrict, you are now developing HTML5. Why is HTML5 not fully available?

You actually have no excuse not to accept HTML5. In fact, the only reason why I use HTML5 is that the code is simple and clear. I have not actually used other features. Now you can consider using HTML5 to write code. It helps you change the way code is written and the way it is designed. Start to write web applications with HTML5 code. Maybe the next mobile application or game application is developed with html5!

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.