Top 10 reasons to use HTML5 now

original
2012/07/20 11:54
Reading 200

Haven't you considered using HTML5 yet? Of course, I guess you may have your own reasons; It has not been 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. We can list many reasons why HTML5 should be used now.

There are many articles about using HTML5 and its advantages and benefits. Yes, our article is similar. With more such articles, Apple's support, Adobe's product development around HTML5, the death of mobile flash, and the support of so many websites, I want to say something to those who still do not have or do not want to accept it. I think the main reason is that it looks like a mysterious thing. Many of them feel like jet packs or flying cars. An untested extraordinary idea but not practical. But in fact, it is very practical now.

In order to decrypt HTML5 and help stubborn developers and designers, I have listed several reasons for using HTML5 here. I hope it will be helpful to everyone!

No. 10: Ease of use

Two reasons make it easier to create websites using HTML5: semantically and ARIA. New HTML tags like <header>,<footer>,<nav>,<section>, <aside> And so on, making it easier for readers to access the content. In the past, even if you defined a class or ID, your readers could not understand what a div was. Using the new semantics to define tags, you can better understand HTML documents and create a better use experience.

ARIA is a W3C standard mainly used to specify "roles" for elements in HTML articles, and create important page terrain through role attributes, such as header footer navigation perhaps aritcle It is necessary. This point has been ignored and not widely used because it is not verified in fact. However, HTML5 will validate such attributes. At the same time, these roles will be built in HTML5 and cannot be ignored. For more HTML5 and ARIA discussions, please check here

No. 9: Video and audio support

Forget flash and other third-party applications, let your video and audio through HTML5 tags <video> and <audio> To access resources. It is always a terrible thing to play media correctly. You need to use <embed> and <object> Tags, and in order for them to play correctly, a lot of parameters must be given. Your media tags will be very complex and confusing. And HTML5 video and audio tags basically regard them as pictures: <video src=""/>

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

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

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

But this code is still better than <embed> and <object> A lot of 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 checking:

The easiest way to use: HTML5 video

The eighth reason: Doctype

Yes, it is the doctype. There is no more content. Is it very simple? There is no need to copy and paste a bunch of incomprehensible code, and there is no redundant head tag. The biggest good news is that, in addition to simplicity, it can work well in every browser, even the infamous IE6.

The seventh reason: clearer code

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

Look at this typical heaer code with simple navigation:

 <div id="header"> <h1>Header Text</h1> <div id="nav"> <ul> <li><a href="#">Link</a></li> <li><a href="#">Link</a></li> <li><a href="#">Link</a></li> </ul> </div> </div>

Is it simple? However, using HTML5 will make the code simpler and more meaningful:

 <header> <h1>Header Text</h1> <nav> <ul> <li><a href="#">Link</a></li> <li><a href="#">Link</a></li> <li><a href="#">Link</a></li> </ul> </nav> </header>

With HTML5, you can use semantic HTML header tags to describe the content to finally solve your div and its class definition problem. Previously, you needed to use a lot of divs to define each page content area, but the new <section> <article> <header> <footer> <aside> and <nav> Tags, you need to make your code clearer and easier to read.

HTML5 and the future web

The sixth reason: smarter storage

The coolest feature in HTML5 is local storage. It is a bit like the integration of the older technology cookie and client database. It is better than cookies because it supports multiple windows storage. It has better security and performance, and can be saved even after the browser is closed. Because it is a client database, you don't have to worry about users deleting any cookies, and all mainstream browsers support it.

Local storage is good for many situations. It is one of the HTML5 tools that does not require third-party plug-ins. The ability to save data to the user's browser means that you can simply create some application features, such as saving user information, caching data, and loading the user's last application state.

The fifth reason: better interaction

We all like better interaction. We all like dynamic websites that give feedback to users. Users can enjoy the process of interaction. input <canvas> The drawing tag of HTML5 allows you to do more interaction and animation, as we achieved with Flash.

except <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

The fourth reason: game development

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

Script tutorials currently provide four separate HTML5 game development tutorials. Here are some interesting games they have developed:

The third reason: legacy and cross browser support

Your modern popular browsers all support HTML5 (Chrome, Firefox, Safari, IE9 and Opera), and have created all browsers such as HTML5 doctype. Even very old and disgusting browsers like IE6 can use them. But just because older browsers can recognize doctype doesn't mean that it can handle HTML5 tags and functions. Fortunately, HTML5 has made development easier and more supports more browsers, so that old IE browsers can use new elements by adding javascript code:

 <!-- [if lt IE 9]> <script src=" http://html5shiv.googlecode.com/svn/trunk/html5.js "></script> <! [endif]-->

The second reason: move, move or move

You can call it "intuition", but I think mobile technology will become more popular. I know that there are some crazy guesses here, and some of you may have thought that Mobile is a fashion! Mobile devices will occupy the world. More mobile devices will grow very quickly. This means that more users will choose to use mobile devices to access websites or web applications. HTML5 is the most mobile development tool. With Adobe's announcement to abandon 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 mobile:

Viewport: allows you to define the viewport width and zoom settings Full screen browser: ISO specified values allow Apple devices to display Home screen icons in full screen mode: like desktop favorites, these icons can be used to add favorites to the home page of IOS and Android mobile devices

The first reason: it is the future, start using it!

The biggest reason why you started using HTML5 today is that it is the future. Don't fall behind! HTML5 will not develop in every direction, but more elements have been adopted by many companies and started to develop. HTML5 is actually more like HTML. It is not a new technology that needs you to learn again! If you develop XHTML strict, you are already developing HTML5. Why not enjoy the functions of HTML5 more completely?

You actually have no excuse not to accept HTML5. In fact, the only reason I use HTML5 is because it is simple and clear to write code. I didn't really use other features. You can consider using HTML5 to write code now, which can help you change the way you write code and its design. Start writing web applications with HTML5 code. Maybe the next mobile application or game application will be developed with HTML5!

Share some good HTML5 resources:

English from: http://tympanus.net/codrops/2011/11/24/top-10-reasons-to-use-html5-right-now/

Expand to read the full text
Loading
Click to lead the topic 📣 Post and join the discussion 🔥
Reward
zero comment
six Collection
zero fabulous
 Back to top
Top