极简的HTML5模版
WEB开发者 发布时间:2015-07-09 17:21:15 作者:佚名 我要评论
这篇文章主要介绍了一个极简的HTML5模版,代码功能的说明基本上都融入于注释之中,需要的朋友可以参考下
分享一个HTML5页面开发的基础性模板,包含了两个版本:开发版本和注释版本。可以被用于基础的服务器端编程框架框架之中^_^
开发版本
XML/HTML Code复制内容到剪贴板
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta charset="utf-8">
- <title></title>
- <meta name="description" content="">
- <meta name="author" content="">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="">
- <!--[if lt IE 9]>
- <script src="//cdn.jsdelivr.net/<span style="width: auto; height: auto; float: none;" id="11_nwp"><a style="text-decoration: none;" mpid="11" target="_blank" href="http://cpro.baidu.com/cpro/ui/uijs.php?adclass=0&app_id=0&c=news&cf=1001&ch=0&di=128&fv=0&is_app=0&jk=ab4a7d1f97e0f21c&k=html5&k0=html5&kdi0=0&luki=6&n=10&p=baidu&q=06011078_cpr&rb=0&rs=1&seller_id=1&sid=1cf2e0971f7d4aab&ssp2=1&stid=0&t=tpclicked3_hc&tu=u1922429&u=http%3A%2F%2Fwww%2Eadmin10000%2Ecom%2Fdocument%2F4756%2Ehtml&urlid=0" id="11_nwl"><span style="color:#0000ff;font-size:14px;width:auto;height:auto;float:none;">html5</span></a></span>shiv/3.7.2/html5shiv.min.js"></script>
- <script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
- <![endif]-->
- <link rel="shortcut icon" href="">
- </head>
- <body>
- <!-- 这里添加页面主要内容 -->
- <!-- SCRIPTS:个人建议在天朝不要使用Google的CDN了,是不是你就发现你的网站功能失效了 -->
- <!-- Example: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> -->
- </body>
- </html>
注释版本
XML/HTML Code复制内容到剪贴板
- <!DOCTYPE <span style="width: auto; height: auto; float: none;" id="0_nwp"><a style="text-decoration: none;" mpid="0" target="_blank" href="http://cpro.baidu.com/cpro/ui/uijs.php?adclass=0&app_id=0&c=news&cf=1001&ch=0&di=128&fv=0&is_app=0&jk=ab4a7d1f97e0f21c&k=html&k0=html&kdi0=0&luki=2&n=10&p=baidu&q=06011078_cpr&rb=0&rs=1&seller_id=1&sid=1cf2e0971f7d4aab&ssp2=1&stid=0&t=tpclicked3_hc&tu=u1922429&u=http%3A%2F%2Fwww%2Eadmin10000%2Ecom%2Fdocument%2F4756%2Ehtml&urlid=0" id="0_nwl"><span style="color:#0000ff;font-size:14px;width:auto;height:auto;float:none;">html</span></a></span>>
- <!--
- 设置lang值来保证<html><span style="width: auto; height: auto; float: none;" id="1_nwp"><a style="text-decoration: none;" mpid="1" target="_blank" href="http://cpro.baidu.com/cpro/ui/uijs.php?adclass=0&app_id=0&c=news&cf=1001&ch=0&di=128&fv=0&is_app=0&jk=ab4a7d1f97e0f21c&k=%B1%EA%C7%A9&k0=%B1%EA%C7%A9&kdi0=0&luki=3&n=10&p=baidu&q=06011078_cpr&rb=0&rs=1&seller_id=1&sid=1cf2e0971f7d4aab&ssp2=1&stid=0&t=tpclicked3_hc&tu=u1922429&u=http%3A%2F%2Fwww%2Eadmin10000%2Ecom%2Fdocument%2F4756%2Ehtml&urlid=0" id="1_nwl"><span style="color:#0000ff;font-size:14px;width:auto;height:auto;float:none;">标签</span></a></span>的互操作性及其可访问性
- 更多HTML标签全局性属性
- 请阅读这里: http://www.w3.org/TR/html-markup/global-attributes.html -->
- <html>
- <<span style="width: auto; height: auto; float: none;" id="2_nwp"><a style="text-decoration: none;" mpid="2" target="_blank" href="http://cpro.baidu.com/cpro/ui/uijs.php?adclass=0&app_id=0&c=news&cf=1001&ch=0&di=128&fv=0&is_app=0&jk=ab4a7d1f97e0f21c&k=head&k0=head&kdi0=0&luki=4&n=10&p=baidu&q=06011078_cpr&rb=0&rs=1&seller_id=1&sid=1cf2e0971f7d4aab&ssp2=1&stid=0&t=tpclicked3_hc&tu=u1922429&u=http%3A%2F%2Fwww%2Eadmin10000%2Ecom%2Fdocument%2F4756%2Ehtml&urlid=0" id="2_nwl"><span style="color:#0000ff;font-size:14px;width:auto;height:auto;float:none;">head</span></a></span>>
- <!--
- 告诉IE使用目前最新的布局引擎:
- 更多信息阅读这里: https://www.modern.ie/en-us/performance/how-to-use-x-ua-compatible -->
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <!--
- 针对web性能定义字符集,首选通过HTTP header来设置
- 确保HTTP header和Meta标签设置一致
- 更多信息阅读这里: https://developers.google.com/speed/docs/best-practices/rendering#SpecifyCharsetEarly -->
- <meta charset="utf-8">
- <!-- 指定页面标题 -->
- <title></title>
- <!-- 指定web页面描述 -->
- <meta name="description" content="">
- <!-- 指定web页面作者 -->
- <meta name="author" content="">
- <!-- 提示移动浏览器使用设备<span style="width: auto; height: auto; float: none;" id="3_nwp"><a style="text-decoration: none;" mpid="3" target="_blank" href="http://cpro.baidu.com/cpro/ui/uijs.php?adclass=0&app_id=0&c=news&cf=1001&ch=0&di=128&fv=0&is_app=0&jk=ab4a7d1f97e0f21c&k=%BF%ED%B6%C8&k0=%BF%ED%B6%C8&kdi0=0&luki=1&n=10&p=baidu&q=06011078_cpr&rb=0&rs=1&seller_id=1&sid=1cf2e0971f7d4aab&ssp2=1&stid=0&t=tpclicked3_hc&tu=u1922429&u=http%3A%2F%2Fwww%2Eadmin10000%2Ecom%2Fdocument%2F4756%2Ehtml&urlid=0" id="3_nwl"><span style="color:#0000ff;font-size:14px;width:auto;height:auto;float:none;">宽度</span></a></span>和缩放比 -->
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <!-- 在页面加载前来加载CSS
- 保证相关样式的及时加载
- 指定对应的URI属性 -->
- <link rel="stylesheet" href="">
- <!--
- 加载<span style="width: auto; height: auto; float: none;" id="4_nwp"><a style="text-decoration: none;" mpid="4" target="_blank" href="http://cpro.baidu.com/cpro/ui/uijs.php?adclass=0&app_id=0&c=news&cf=1001&ch=0&di=128&fv=0&is_app=0&jk=ab4a7d1f97e0f21c&k=html&k0=html&kdi0=0&luki=2&n=10&p=baidu&q=06011078_cpr&rb=0&rs=1&seller_id=1&sid=1cf2e0971f7d4aab&ssp2=1&stid=0&t=tpclicked3_hc&tu=u1922429&u=http%3A%2F%2Fwww%2Eadmin10000%2Ecom%2Fdocument%2F4756%2Ehtml&urlid=0" id="4_nwl"><span style="color:#0000ff;font-size:14px;width:auto;height:auto;float:none;">html</span></a></span>shiv和respond.js来兼容老版本的IE浏览器
- 方便使用HTML5中的新元素和media queries -->
- <!--[if lt IE 9]>
- <script <span style="width: auto; height: auto; float: none;" id="5_nwp"><a style="text-decoration: none;" mpid="5" target="_blank" href="http://cpro.baidu.com/cpro/ui/uijs.php?adclass=0&app_id=0&c=news&cf=1001&ch=0&di=128&fv=0&is_app=0&jk=ab4a7d1f97e0f21c&k=src&k0=src&kdi0=0&luki=5&n=10&p=baidu&q=06011078_cpr&rb=0&rs=1&seller_id=1&sid=1cf2e0971f7d4aab&ssp2=1&stid=0&t=tpclicked3_hc&tu=u1922429&u=http%3A%2F%2Fwww%2Eadmin10000%2Ecom%2Fdocument%2F4756%2Ehtml&urlid=0" id="5_nwl"><span style="color:#0000ff;font-size:14px;width:auto;height:auto;float:none;">src</span></a></span>="//cdn.jsdelivr.net/<span style="width: auto; height: auto; float: none;" id="6_nwp"><a style="text-decoration: none;" mpid="6" target="_blank" href="http://cpro.baidu.com/cpro/ui/uijs.php?adclass=0&app_id=0&c=news&cf=1001&ch=0&di=128&fv=0&is_app=0&jk=ab4a7d1f97e0f21c&k=html5&k0=html5&kdi0=0&luki=6&n=10&p=baidu&q=06011078_cpr&rb=0&rs=1&seller_id=1&sid=1cf2e0971f7d4aab&ssp2=1&stid=0&t=tpclicked3_hc&tu=u1922429&u=http%3A%2F%2Fwww%2Eadmin10000%2Ecom%2Fdocument%2F4756%2Ehtml&urlid=0" id="6_nwl"><span style="color:#0000ff;font-size:14px;width:auto;height:auto;float:none;">html5</span></a></span>shiv/3.7.2/html5shiv.min.js"></script>
- <script src="//cdnjs.cloudflare.com/<span style="width: auto; height: auto; float: none;" id="7_nwp"><a style="text-decoration: none;" mpid="7" target="_blank" href="http://cpro.baidu.com/cpro/ui/uijs.php?adclass=0&app_id=0&c=news&cf=1001&ch=0&di=128&fv=0&is_app=0&jk=ab4a7d1f97e0f21c&k=ajax&k0=ajax&kdi0=0&luki=8&n=10&p=baidu&q=06011078_cpr&rb=0&rs=1&seller_id=1&sid=1cf2e0971f7d4aab&ssp2=1&stid=0&t=tpclicked3_hc&tu=u1922429&u=http%3A%2F%2Fwww%2Eadmin10000%2Ecom%2Fdocument%2F4756%2Ehtml&urlid=0" id="7_nwl"><span style="color:#0000ff;font-size:14px;width:auto;height:auto;float:none;">ajax</span></a></span>/libs/respond.js/1.4.2/respond.min.js"></script>
- <![endif]-->
- <!-- 指定favicon的URI -->
- <link rel="shortcut icon" href="">
- <!-- 下面注释掉的是ios/android书签图标-->
- <!--
- <meta name="mobile-web-app-capable" content="yes">
- <link rel="icon" sizes="196x196" href="">
- <link rel="apple-touch-icon" sizes="152x152" href="">
- -->
- <!--
- 如果可能使用async属性来非阻断的加载脚本
- 例子: <script <span style="width: auto; height: auto; float: none;" id="8_nwp"><a style="text-decoration: none;" mpid="8" target="_blank" href="http://cpro.baidu.com/cpro/ui/uijs.php?adclass=0&app_id=0&c=news&cf=1001&ch=0&di=128&fv=0&is_app=0&jk=ab4a7d1f97e0f21c&k=src&k0=src&kdi0=0&luki=5&n=10&p=baidu&q=06011078_cpr&rb=0&rs=1&seller_id=1&sid=1cf2e0971f7d4aab&ssp2=1&stid=0&t=tpclicked3_hc&tu=u1922429&u=http%3A%2F%2Fwww%2Eadmin10000%2Ecom%2Fdocument%2F4756%2Ehtml&urlid=0" id="8_nwl"><span style="color:#0000ff;font-size:14px;width:auto;height:auto;float:none;">src</span></a></span>="" async></script> -->
- </<span style="width: auto; height: auto; float: none;" id="9_nwp"><a style="text-decoration: none;" mpid="9" target="_blank" href="http://cpro.baidu.com/cpro/ui/uijs.php?adclass=0&app_id=0&c=news&cf=1001&ch=0&di=128&fv=0&is_app=0&jk=ab4a7d1f97e0f21c&k=head&k0=head&kdi0=0&luki=4&n=10&p=baidu&q=06011078_cpr&rb=0&rs=1&seller_id=1&sid=1cf2e0971f7d4aab&ssp2=1&stid=0&t=tpclicked3_hc&tu=u1922429&u=http%3A%2F%2Fwww%2Eadmin10000%2Ecom%2Fdocument%2F4756%2Ehtml&urlid=0" id="9_nwl"><span style="color:#0000ff;font-size:14px;width:auto;height:auto;float:none;">head</span></a></span>>
- <body>
- <!-- 这里添加页面主要内容 -->
- <!-- 如果可能使用async属性来非阻断的加载脚本 -->
- <!-- SCRIPTS -->
- <!-- 例子: <script src="http://<span style="width: auto; height: auto; float: none;" id="10_nwp"><a style="text-decoration: none;" mpid="10" target="_blank" href="http://cpro.baidu.com/cpro/ui/uijs.php?adclass=0&app_id=0&c=news&cf=1001&ch=0&di=128&fv=0&is_app=0&jk=ab4a7d1f97e0f21c&k=ajax&k0=ajax&kdi0=0&luki=8&n=10&p=baidu&q=06011078_cpr&rb=0&rs=1&seller_id=1&sid=1cf2e0971f7d4aab&ssp2=1&stid=0&t=tpclicked3_hc&tu=u1922429&u=http%3A%2F%2Fwww%2Eadmin10000%2Ecom%2Fdocument%2F4756%2Ehtml&urlid=0" id="10_nwl"><span style="color:#0000ff;font-size:14px;width:auto;height:auto;float:none;">ajax</span></a></span>.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> -->
- </body>
- </html>
相关文章
HTML5中的DOCUMENT.VISIBILITYSTATE属性详解
在 HTML5 中,文档对象(即 document 对象)具有一个 visibilityState 属性,该属性表示当前文档对象的可见性状态,这篇文章主要介绍了HTML5中的DOCUMENT.VISIBILITYSTATE2023-05-05- 表格是常见的数据统计的一种形式,合并单元格及合并表头经常在复杂表格中遇到,本文主要介绍了html原生table实现合并单元格以及合并表头的示例代码,感兴趣的可以了解一下2023-04-28
- 分时大盘回顾功能是一种用于分析股票行情的工具,本文就介绍一下HTML5 Canvas 绘制股市走势图,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习2023-04-25
- 开发uni-app的编辑器HBuilderX可以将H5项目打包成APP,相信很多小伙伴还不知道这个功能,下面将介绍下如何将H5打包成APP,感兴趣的朋友一起看看吧2023-04-03
- 本文将介绍移动端H5实现拍照功能的两种方法:使用HTML5的input标签和使用第三方插件,帮助读者更好地理解和掌握移动端H5拍照功能的实现,感兴趣的可以了解一下2023-03-30
- 普通的显示数据的时候,ul就是项目列表,li就是列表项,可以用来显示数据,如果用于DIV+CSS布局的话,ul+li可以替换表格的作用,具体的设置,如果宽度高度、行间距、背景2023-02-20
- 本文主要介绍了Html5播放器实现倍速播放的方法示例,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习2023-01-12
- 在HTML5中,可以使用Web Worker创建一个后台线程执行一个耗时任务,本文主要介绍了HTML5 Web Worker(多线程处理),感兴趣的可以了解一下2023-01-12
- 短视频已经无数不在了,但是主体还是使用 app 来承载的,本文讲述 H5 如何实现 app 的视频滑动体验,本文对实现过程中踩到的坑做一个总结,结合示例代码给大家介绍的非常详2023-01-05
- 这篇文章主要介绍了HTML5页面打开微信小程序功能,本文通过示例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下2022-09-20
最新评论