美文网首页
Chapter 5 标准

Chapter 5 标准

作者: Holase | 来源:发表于2016-11-01 22:00 被阅读0次

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

相关文章

网友评论

      本文标题: Chapter 5 标准

      本文链接:https://www.haomeiwen.com/subject/gatvuttx.html