最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501
当前位置: 首页 - 科技 - 知识百科 - 正文

HTML5基础模板的实例代码分享

来源:懂视网 责编:小采 时间:2020-11-27 15:10:19
文档

HTML5基础模板的实例代码分享

HTML5基础模板的实例代码分享:HTML5基础模板的实例代码分享<!doctype html><!-- simplified doctype works for all previous versions of HTML as well --> <!-- Paul Irish's technique for targeting IE, mo
推荐度:
导读HTML5基础模板的实例代码分享:HTML5基础模板的实例代码分享<!doctype html><!-- simplified doctype works for all previous versions of HTML as well --> <!-- Paul Irish's technique for targeting IE, mo

HTML5基础模板的实例代码分享

<!doctype html><!-- simplified doctype works for all previous versions of HTML as well -->

<!-- Paul Irish's technique for targeting IE, modified to only target IE6, applied to the html element instead of body -->
<!--[if lt IE 7 ]><html class="no-js ie6"><![endif]-->
<!--[if (gt IE 6)|!(IE)]><!--><html><!--<![endif]-->

<head>
 <!-- simplified character encoding -->
 <meta charset="utf-8">

 <title>Easy HTML5 Template</title>
 <meta name="description" content="Easy HTML5 Template">
 <meta name="author" content="">

 <!-- Delete these two icon references once you've placed them in the root directory with these file names -->
 <!-- favicon 16x16 -->
 <link rel="shortcut icon" href="/favicon.ico">
 <!-- apple touch icon 57x57 -->
 <link rel="apple-touch-icon" href="/apple-touch-icon.png">

 <!-- Main style sheet. Change version number in query string to force styles refresh -->
 <!-- link element no longer needs type attribute -->
 <link rel="stylesheet" href="css/screen.css?v=1.0">

 <!-- Modernizr for feature detection of CSS3 and HTML5; must be placed in the "head" -->
 <!-- Script tag no longer needs type attribute -->
 <script src="js/modernizr-1.6.min.js"></script>

 <!-- Remove the script reference below if you're using Modernizr -->
 <!--[if lt IE 9]>
 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
 <![endif]-->

</head>

<!-- If possible, use the body as the container -->
<!-- The "home" class is an example of a dynamic class created on the server for page-specific targeting -->
<body>

 <!-- ******************************************************************** -->
 <!-- The content below is for demonstration of some common HTML5 elements -->
 <!-- More than likely you'll rip out everything except header/section/footer and start fresh -->

 <!-- First header has an ID so you can give it individual styles, and target stuff inside it -->
 <header id="hd1">

 <!-- "hgroup" is used to make two headings into one, to prevent a new document node from forming -->
 <hgroup>
 <h1>Easy HTML5 Template</h1>
 <h2>tagline</h2>
 </hgroup>

 <!-- Main nav, styled by targeting "#hd1 nav"; you can have more than one nav element per page -->
 <nav>
 <ul>
 <li><a href="#">Home</a></li>
 <li><a href="#">About</a></li>
 <li><a href="#">Services</a></li>
 <li><a href="#">Contact</a></li>
 </ul>
 </nav>

 </header><!-- #hd1 -->

 <section id="main">

 <!-- Each section should begin with a new h1 (not h2), and optionally a header -->
 <!-- You can have more than one header/footer pair on a page -->
 <header>
 <h1>This is a Page Sub Title</h1>
 </header>

 <p>Some content...</p>

 <!-- The h2 below is a sub heading relative to the h1 in this section, not for the whole document -->
 <h2>Demonstrating EM and STRONG</h2>

 <!-- "strong" is used for SEO and contextual hierarchy -->
 <p><strong>This text will have more importance (SEO-wise and contextually)</strong></p>

 <!-- "b" is used for stylistic offset of text that's NOT important contextually -->
 <p><b>This text has visual importance but has no contextual or SEO importance</b></p>

 <!-- "em" is used for colloquial-style emphasis -->
 <p>This is a <em>very</em> collooqial expression.</p>

 <!-- There can be multiple footers on each page -->
 <!-- Secondary headers and footers don't necesarily need ids; they can be targeted via context (i.e. "#main footer") -->
 <footer>
 <!-- incite a riot: http://24ways.org/2009/incite-a-riot -->
 <p>Author: <cite>Louis Lazaris</cite></p>
 </footer>

 </section><!-- #main -->

 <!-- The "aside" element could be a sidebar (outside an article or section) -->
 <!-- Or it could reference other tangentially-related content within an article or section -->
 <aside id="sidebar">
 <p>Sidebar content</p>
 </aside>

 <!-- The main footer has an ID for targeting, similar to the main header -->
 <footer id="f1">
 <p>copyright ? year</p>
 </footer><!-- #f1 -->

<!-- Remote jQuery with local fallback; taken from HTML5 Boilerplate http://html5boilerplate.com -->
<!-- jQuery version might not be the latest; check jquery.com -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="js/jquery-1.4.4.min.js"%3E%3C/script%3E'))</script>

<!-- Below is your script file, which has a basic JavaScript design pattern that you can optionally use -->
<!-- Keep this and plugin scripts at the bottom for faster page load; combining and minifying scripts is recommended -->
<script src="js/general.js"></script>

<!-- asynchronous analytics code by Mathias Bynens; change UA-XXXXX-X to your own code; http://mathiasbynens.be/notes/async-analytics-snippet -->
<!-- this can also be placed in the <head> if you want page views to be tracked quicker -->
<script>
var _gaq = [['_setAccount', 'UA-XXXXX-X'], ['_trackPageview']];
(function(d, t) {
 var g = d.createElement(t),
 s = d.getElementsByTagName(t)[0];
 g.async = true;
 g.src = ('https:' == location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
 s.parentNode.insertBefore(g, s);
})(document, 'script');
</script>
</body>
</html>

声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文档

HTML5基础模板的实例代码分享

HTML5基础模板的实例代码分享:HTML5基础模板的实例代码分享<!doctype html><!-- simplified doctype works for all previous versions of HTML as well --> <!-- Paul Irish's technique for targeting IE, mo
推荐度:
标签: 分享 代码 模板
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top