什么是 HTML 5?

其实这个题目的意图是想知道你「会不会搜索」。

人人都在说 HTML 5,你却不知道 HTML 5 是什么。

为什么会这样?

因为你不知道哪里的前端知识是靠谱的,你只能听别人说。

今天我们介绍一个靠谱的前端知识来源——MDN(Mozilla Developer Network)。

谷歌搜索「HTML 5 MDN」即可搜到权威介绍

HTML 5 概览

HTML 5 是新版 Web 技术的集合,包含以下八个部分:

1. 语义升级

  • HTML 5 加了很多新的标签,使 HTML 更富有语义。
  • 升级了 iframe 标签,使其更安全。
  • 新增 MathML,是数学公式可以在 Web 中展现。

2. 服务器增强

  • 新增 Web Sockets
  • 新增 EventSource API
  • 新增 WebRTC

3. 离线储存

  • 新增 AppCache
  • online 与 offline 事件
  • localStorage 和 sessionStorage
  • IndexedDB
  • File API

4. 多媒体

  • Web 原生支持音视频播放
  • Camera API 可控制摄像头

5. 图像绘制

  • Canvas 可绘制图像和文本
  • WebGL 可渲染 3D 影像
  • SVG 可制作矢量图形

6. 更多集成

  • Web Workers 能够把 JavaScript 计算委托给后台线程
  • XMLHttpRequest 升级
  • History API 允许对浏览器历史记录进行操作
  • 新增 conentEditable 属性
  • 拖放 API、全屏 API、指针锁定 API
  • 可以使用 navigator.registerProtocolHandler() 方法把 web 应用程序注册成一个协议处理程序。
  • requestAnimationFrame 允许控制动画渲染以获得更优性能。

7. 设备相关 API

你现在可以用 JS 来处理摄像头、触控屏幕、地理位置等设备相关功能了。

8. 样式

CSS 全面升级。

H5 是什么?

H5 就是微信里面长得像 PPT、可以一页一页滑动的网页。

以上,就是 MDN 用法的介绍——获取靠谱知识。

作者:方应杭, 想学前端?进群

33 thoughts on “什么是 HTML 5?”

  1. Pretty nice post. I just stumbled upon your weblog and wanted to say that I have truly enjoyed surfing around your blog posts. After all I will be subscribing to your rss feed and I hope you write again soon!|

  2. you are really a just right webmaster. The site loading speed is amazing. It seems that you’re doing any distinctive trick. Also, The contents are masterpiece. you’ve performed a wonderful activity in this topic!|

  3. Wonderful goods from you, man. I have bear in mind your stuff prior to and you are just too magnificent.

    I really like what you’ve got right here, certainly like what you are stating
    and the way in which in which you assert it. You’re making it entertaining and you continue to care for to keep it sensible.
    I can not wait to read much more from you. This is actually a terrific
    site.

  4. I seriously love your blog.. Very nice colors & theme.

    Did you make this site yourself? Please reply back as I’m wanting to create my own personal site and want to learn where you got this from or exactly what
    the theme is named. Kudos!

  5. Can I simply say what a comfort to find someone who actually understands what they’re discussing on the web.
    You actually understand how to bring a problem to light and
    make it important. More and more people should read this and understand this side of your story.
    It’s surprising you’re not more popular given that you surely have the
    gift.

  6. I seriously love your site.. Pleasant colors & theme. Did
    you build this site yourself? Please reply back as I’m attempting to create my very own blog and would like to learn where you got
    this from or what the theme is called. Cheers!

  7. A motivating discussion is definitely worth comment.
    I do think that you should write more about this subject
    matter, it might not be a taboo subject
    but generally folks don’t talk about such issues. To the next!
    Many thanks!!

  8. My brother suggested I might like this web site.
    He was entirely right. This post truly made my day.

    You cann’t imagine just how much time I had spent for
    this information! Thanks!

  9. Great blog right here! Additionally your web site lots
    up very fast! What web host are you the usage of?
    Can I am getting your affiliate hyperlink on your host?

    I want my site loaded up as quickly as yours lol

  10. My husband and i felt quite contented that Emmanuel managed to complete his web research while using the ideas he came across from your very own web site. It is now and again perplexing to simply choose to be offering concepts the others could have been trying to sell. We really take into account we now have the writer to appreciate because of that. All of the explanations you made, the easy blog menu, the relationships you can aid to promote – it is everything terrific, and it’s really assisting our son in addition to the family reckon that the situation is fun, which is certainly particularly pressing. Many thanks for all the pieces!

  11. My spouse and i got really peaceful Peter could carry out his preliminary research with the ideas he got in your web pages. It’s not at all simplistic just to continually be freely giving concepts which usually some others may have been trying to sell. And now we realize we have you to thank because of that. The illustrations you’ve made, the easy site menu, the relationships you will make it easier to create – it is most astonishing, and it’s helping our son in addition to the family understand the concept is awesome, which is certainly rather fundamental. Thank you for everything!

  12. I precisely wished to say thanks once more. I am not sure the things I could possibly have created without the actual tricks shared by you regarding this industry. It truly was an absolute alarming condition in my position, nevertheless considering the specialized mode you processed it forced me to jump over delight. I am grateful for this information and then wish you are aware of an amazing job that you’re providing training people through the use of your blog. I know that you’ve never encountered any of us.

  13. Needed to post you one very little remark to be able to say thanks as before for your magnificent knowledge you’ve discussed in this article. It is so particularly open-handed of people like you to supply easily what exactly a lot of people could possibly have offered as an ebook to help make some dough for their own end, most importantly seeing that you could possibly have done it in case you decided. The solutions as well worked to become a good way to comprehend other individuals have the same dream like my personal own to know a whole lot more with reference to this issue. I believe there are thousands of more pleasurable times up front for those who read your website.

  14. I want to point out my appreciation for your kindness supporting men and women who require assistance with this idea. Your real dedication to getting the solution across appears to be definitely beneficial and has in most cases helped those like me to attain their ambitions. The warm and friendly guideline can mean this much to me and a whole lot more to my fellow workers. Thanks a lot; from all of us.

  15. What’s Going down i’m new to this, I stumbled upon this I have discovered It absolutely useful and it has helped me
    out loads. I’m hoping to contribute & help different users like
    its helped me. Great job. y2yxvvfw cheap flights

  16. Amazing blog! Is your theme custom made or did you download it
    from somewhere? A design like yours with a few simple tweeks would
    really make my blog shine. Please let me know where you got your design. Bless you

  17. I enjoy you because of every one of your hard work on this web site. Kate take interest in making time for research and it’s obvious why. Almost all learn all relating to the powerful tactic you produce good tricks on your website and in addition inspire participation from some others about this article while our own daughter is in fact discovering a lot. Take advantage of the rest of the year. You are conducting a first class job.

  18. I am just commenting to let you be aware of what a wonderful encounter my daughter encountered browsing your web site. She discovered a wide variety of things, which include what it is like to possess a great teaching spirit to make many more smoothly know certain advanced subject areas. You truly did more than our own expectations. I appreciate you for producing the interesting, trusted, informative not to mention easy guidance on the topic to Janet.

  19. I am commenting to make you know of the really good encounter my cousin’s princess had visiting your site. She realized a lot of pieces, which include how it is like to possess a wonderful giving character to let others with ease know some hard to do things. You undoubtedly surpassed our expectations. Thanks for giving the useful, trustworthy, revealing and in addition easy thoughts on this topic to Julie.

  20. What’s Going down i am new to this, I stumbled upon this I have
    found It absolutely helpful and it has aided me out loads. I hope to contribute & aid other users like its aided me.
    Good job.

  21. Needed to put you this very small remark to finally say thanks a lot over again for the awesome information you have shared above. It is pretty generous with people like you to offer easily exactly what a few individuals could have made available for an e-book to make some money for themselves, specifically considering that you might well have tried it in the event you considered necessary. The points as well worked as the fantastic way to be sure that someone else have similar eagerness similar to mine to understand great deal more when it comes to this condition. I’m certain there are many more fun sessions ahead for people who view your site.

  22. An attention-grabbing dialogue is price comment. I believe that you should write more on this topic, it might not be a taboo topic but usually persons are not sufficient to talk on such topics. To the next. Cheers

发表评论

电子邮件地址不会被公开。