温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

html 5头部写法 几个最显著的特征

发布时间:2020-05-29 20:30:11 来源:网络 阅读:528 作者:cet68 栏目:移动开发

1,看一下头部

先看一下xhtml的写法

 

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
  2. <html xmlns="http://www.w3.org/1999/xhtml"> 
  3. <head> 
  4. <title>title</title> 
  5. <meta name="description" content="description"/> 
  6. <link rel="stylesheet" type="text/css" href="/c3.css" /> 
  7. <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 
  8. <meta http-equiv="Content-Language" content="zh-cn" /> 
  9. <meta name="robots" content="all" /> 
  10. <meta name="author" content="lunanzuche.com.cn" /> 
  11. <meta name="Copyright" content="Copyright www.lunanzuche.com All Rights Reserved." /> 
  12. <meta name="MSSmartTagsPreventParsing" content="true" /> 
  13. <meta http-equiv="p_w_picpathtoolbar" content="false" /> 

看一下html5

 

  1. <!DOCTYPE html> 
  2. <html lang="en-US"> 
  3. <head> 
  4. <meta charset="utf-8" /> 
  5. <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> 
  6. <title>Goldman Sachs</title> 

显著区别在于:

  • <meta charset="utf-8" />
  • <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
  • <html xmlns="http://www.w3.org/1999/xhtml">

  • <!DOCTYPE html> 
  • <html lang="en-US">
  • 当然 lang可以不写
  •  
  • <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    换成了:
向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI