HTML页的基本模板以及各部分含义

以下模板出自<a target=_blank href="http://v3.bootcss.com/getting-started/" target="_blank">http://v3.bootcss.com/getting-started/</a> bootstrap中文网

<!DOCTYPE html>
<html lang="zh-cn">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Bootstrap 101 Template</title>

    <!-- Bootstrap -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
    <h1>你好,世界!</h1>

    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="js/bootstrap.min.js"></script>
  </body>
</html>


 

<!DOCTYPE html>
    确保在每个浏览器中拥有一致的展现

<html lang="zh-CN"> </html>
 为文档设置正确的语言

<meta http-equiv="X-UA-Compatible" content="IE=Edge">
IE 支持通过特定的 <meta> 标签来确定绘制当前页面所应该采用的 IE 版本。除非有强烈的特殊需求,否则最好是设置为edge mode,从而通知 IE 采用其所支持的最新的模式。

<meta charset="UTF-8">
通过明确声明字符编码,能够确保浏览器快速并容易的判断页面内容的渲染方式。这样做的好处是,可以避免在 HTML 中使用字符实体标记(character entity),从而全部与文档编码一致(一般采用 UTF-8 编码)。
    

<span style="font-size:18px;">   <span style="color:#666666;"><script src="js/bootstrap.min.js"></script>
  </body></span></span>
<pre style="margin-top: 0px; margin-bottom: 0px; background-color: rgb(247, 247, 249); line-height: 1.4; white-space: pre-wrap;"><code class="html" style="padding: 0px; background-color: transparent; border-top-left-radius: 0.2rem; border-top-right-radius: 0.2rem; border-bottom-right-radius: 0.2rem; border-bottom-left-radius: 0.2rem; border: 0px;"><span class="nt"><span style="font-family: 'Microsoft YaHei';"><span style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Hiragino Sans GB', 'Hiragino Sans GB W3', 'WenQuanYi Micro Hei', 'Microsoft YaHei UI', 'Microsoft YaHei', sans-serif; line-height: 30px;"><span style="font-size:18px;color:#996633;"> 推荐将所有的<script>标签尽可能放到<body>标签的底部,以尽量减少对整个页面下载的影响</span><span style="font-size:14px;"><span style="color:#996633;">。</span><span style="color:#5a5a5a;">由于执行脚本会阻塞页面渲染,直到它们全部下载并执行完成后,页面的渲染才会继续。因此页面的性能问题会很明显。浏览器在解析到<body>标签之前,不会渲染页面的任何部分.</span></span></span></span></span></code>

 


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值