Chapter 5 標準

HTML5的doctpe:<!doctype html>
HTML不會再有版本6、7、8.....
HTML已經是一個活的標準,會隨著技術發展形成響的文檔。
瀏覽器的向后兼容性。瀏覽器會支持新以及舊內容內容。所以,規范變化時,舊的HTML照常工作。

舊有的HTML一般只能構造靜態網頁,HTML5的新元素新屬性可以支持動態網頁。

驗證所寫頁面是否合法,可以使用w3c官方驗證網站


<meta>指定頁面的編碼格式
ex:
<meta charset="utf-8">這一行加在<head>元素中所有其他元素之上。


Warning!

An <img> element must have an <alt> attribute



some tips for HTML

  • must start with<!doctype html>
  • <html> following after <!doctype html> </html>at the end of the script
  • <head>``<body> are the onnly two elements can put between <html>&</html>
  • at the begining of <head>,define <meta charset="utf-8">
  • <head>must have a <title>
  • be careful when you are nesting elements
  • check the attributes
最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容