[Html5] Top 10 reasons for html5 use and top 10 reasons for html5 use

Source: Internet
Author: User
Tags html header home screen

[Html5] Top 10 reasons for html5 use and top 10 reasons for html5 use

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. Yes, this article is similar. 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 websites using html5: semantics and aria. New html tags such as

Aria is a w3c standard used to specify "Roles" for elements in html documents. It is necessary to create important page terrain such as header, footer, navigation, or aritcle through role attributes. 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 to allow your video and audio to access resources through html5 tags <video> and <audio>. Correct playing of media has always been a terrible thing. You need to use the <embed> and <object> tags and assign a lot of parameters to them for proper playing. Your media tags will be very complex and confusing. 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 process is very simple. However, our old browsers may not like html5. You need to add more code to make them work correctly. However, this code is much simpler than <embed> and <object>.

<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>
The eighth major reason: doctype
<!doctype html>

That's right. It's doctype. There's no more. Is it very simple? 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 prefer simple, elegant, and easy-to-read 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 header 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 label of the semantic line to describe the content and finally solve the div and class definition problems. In the past, you used a lot of div to define the content area of each page. However, you used the new <section>, <article>, 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 cookies 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 make more interactions and animations, just like what we achieved with flash.

In addition to <canvas>, html5 also has many APIs that allow you to create better user experience and more dynamic web applications. Here is a list:

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

You can use html5 <canvas> to 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 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 js Code:

<!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
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, which means 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 webapps.

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 the viewport width and scaling settings;
  • Full-screen Browser: the value specified by ios allows full-screen display of apple devices;
  • Home screen icons: Like a desktop favorites, these icons can be used to add a Home page to favorites on ios and android mobile devices.
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 xhtml strict, 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!

 

Original article: Top 10 Reasons to Use HTML5 Right Now

Reposted address: Top 10 reasons for using html5-moonlight blog


How to Use html5

Html5 starts with <! DOCTYPE html>,
Html5 has many new elements available, such as <audio> <video> There are a lot of html5 books at present, and I am also learning

How to reconstruct an existing website using HTML5

For an existing website that is not modified on the interface, you must modify the HTML Tag and use the HTML5 tag.
For example, you may have written the header like this.
<Div class = "header"> ...... </div>
Now you can use HTML5 labels.
<Header> ......
Then some of the original JavaScript implementations can be implemented through html5. Of course, it is best to use js to make up for browsers that do not support html5.
For example, you may have verified that the email was in js.
<Input type = "text" value = "email"/>
Now you can use html5
<Input type = "email" value = "email"/>
Let the browser automatically verify the email, but it is best not to discard the js part, or retain it. In this case, Some browsers that do not support HTML5 can still be used normally.

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.