麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > 開發 > HTML5 > 正文

HTML5與未來的網頁設計(英文教程)

2024-09-05 07:11:30
字體:
來源:轉載
供稿:網友

有些人接受了 ,有些人丟棄它太遙遠的未來,有些人放棄了濫用的朋友有利于舊火焰在籌備。任何一方的辯論你的,你最有可能聽到的所有的博客聊天圍繞“新炎熱” ,也就是html5 。它無處不在,它的未來,和你想知道的一切,您可以收到的舊新聞。

像jquery插件,格式技術,并設計趨勢的變化非常迅速地在整個網絡社會。并在大多數情況下我們都接受的是,有些事情我們知道今天可以過時的明天,但是這是我們行業的性質。

在尋找一些穩定,我們通常可以轉向代碼本身,因為它往往會保持不變了很長一段時間(相對而言) 。因此,當一些驚喜和改變我們的代碼,這是一個大問題,以及將有一些成長的痛苦,我們必須通過。幸運的是,據傳,我們已經少了一個變化的擔心 。

在這篇文章中,我希望能夠給你一些提示和洞察html5 ,以幫助減輕疼痛的必然附帶過渡到一種略有不同的語法。

 

welcome to html5.

html5 logo

what are the basics?

the doctype

when i first started researching html5 a few months ago, one of the main things i struggled to find was the doctype. a simple thing, you’d think it would be everywhere, but after much frustration, i finally found it buried within w3.org and here it is:

<!doctype html>

我也好奇,為什么他們選擇“的html ” ,而不是“ html5 ” ,這似乎合乎邏輯的方式來告訴瀏覽器,目前的文件寫于html5 ,并提供了一個良好的范本,以供未來。但我發現, <!doctype html5>觸發夸克斯模式中的ie6 ,和向后兼容時,考慮到<!doctype html>是一個相當不錯的選擇(在我看來) 。

總之,我真的很喜歡這個新的文檔,它的小的,有意義的,也許我們會實際上能夠記住這個時刻的心,而不是將其粘貼在網站上。

 

new elements you should know

at first glance, with html5, the new elements immediately jump out and command attention. the w3c really listened to the community and planned for the future when architecting the abundance of new elements available. we have everything from basic structural elements like <header> and <footer> to others like <canvas> and <audio> that tap into, what seems to be, a very powerful api which allows us the freedom to create more user-friendly applications while further distancing ourselves from reliance on flash for saving data and intense animation.

the new structural elements
  • <header>
    the header element contains introductory information to a section or page. this can involve anything from our normal documents headers (branding information) to an entire table of contents.
  • <nav>
    the nav element is reserved for a section of a document that contains links to other pages or links to sections of the same page. not all link groups need to be contained within the <nav> element, just primary navigation.
  • <section>
    the section element represents a generic document or application section. it acts much the same way a <div> does by separating off a portion of the document.
  • <article>
    the article element represents a portion of a page which can stand alone such as: a blog post, a forum entry, user submitted comments or any independent item of content.
  • <aside>
    aside, represents content related to the main area of the document. this is usually expressed in sidebars that contain elements like related posts, tag clouds, etc. they can also be used for pull quotes.
  • <footer>
    the footer element is for marking up the footer of, not only the current page, but each section contained in the page. so, it’s very likely that you’ll be using the <footer> element multiple times within one page.

when you take a look at these new elements, it looks like they’re just replacing our common div ids; and in a way, it’s true. but, the diagram below shows that elements like <header> and <footer> can be used more than once on a single page where they behave more like classes and normal html elements that you can use over and over again to retain a semantic structure.

html5 structure doc

elements like <header> and <footer> are not just meant to represent the top and bottom of the current document, but they also represent the <header> and <footer> of each document section, much the way we use <thead> and <tfoot> in data tables.

the benefits of using these structural elements is mainly due to the fact that they are extremely well defined and provide a great way to semantically structure your document. however, these elements do need to be used with some careful thought because they can, very easily be overused.

further reading on structural html5
  • steve smith on structural tags in html5
  • lachlan hunt’s preview of html5
  • elliot harold on new elements in html5
  • bruce lawson’s html5 form demo

easing the transition from xhtml

even though html 4.01, xhtml 1.0, & html5 are all very similar there are some small syntax differences that can, very easily, slip past anyone and invalidate code. keeping this in mind, html5 has some built-in “slack” to make the transition a little easier.

for example, when marking up a form in html5, this is the proper syntax for an input text element:

<input type="text" id="name">

but this is also accepted as valid code in an attempt to ease the pain for avid xhtml coders (like myself) who are used to self-closing elements:

<input type="text" id="name"/>

the same rules apply to <meta> and other self closing elements. legacy elements like <b> and <i> were also left in to help those coming over from html 4.01.l

what are the benefits?

with any new technology there has to be benefit; why else would you use it? if your old code works just as well and efficient as the new code there’s no reason to upgrade. no reason at all, trust me, i checked.

luckily html5 is packed with cool new features, code slimming techniques and a lot of stuff i would call very large benefits. most of which circle around the new apis and the dom tree.

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 在线播放黄色片 | 国产激情视频在线 | 天天草天天干天天射 | 成人在线视频免费 | 日本xxxx视频| 久久精品欧美视频 | 国产黄色网页 | 啪啪毛片 | 黄色视屏免费观看 | 免费a视频在线观看 | 中国黄色一级生活片 | 欧美精品免费一区二区三区 | 看毛片免费 | 精品一区二区三区在线观看视频 | 日本成年免费网站 | 精国产品一区二区三区四季综 | 成人做爽爽爽爽免费国产软件 | 久久免费精品视频 | 国产精品99久久久久久久女警 | 91 免费看片 | 成人免费一区二区三区 | 在线成人免费观看视频 | 黄色av网站免费 | 午夜精品久久久久久中宇 | 国产成人综合在线 | 精品影视一区二区 | 特黄一级小说 | 国产女厕一区二区三区在线视 | 国产亚洲在线 | 深夜福利视频免费观看 | 欧美中文字幕一区二区三区亚洲 | 国产精品一品二区三区四区18 | 成人精品久久久 | 国产精品视频六区 | 午夜视频在线观看免费视频 | 日韩黄色片免费看 | 九九热在线视频观看 | 久久久国产一区二区三区 | 老女人碰碰在线碰碰视频 | 看免费毛片 | 一级免费a |