html5.0学习

html5.0

万维网的核心语言、标准通用标记语言下的一个应用超文本标记语言(HTML)的第五次重大修改(这是一项推荐标准[1] 、外语原文:W3C Recommendation。)

html5.0的架构

Html5.0被认为是HTMLCSSJavascript结合的产物,这三者都是可靠的技术并且在Html5.0规范下组织为一个整体,html负责结构,css负责在屏幕上呈现该结构和内容,而Javascript负责其余一些任极为重要的工作

html的基本标签

<HTML>文件开始  <HEAD>标头区开始 <TITLE>...</TITLE>标题区 </HEAD>标头区结束

<BODY> 本文区开始本文区内容(正文) </BODY>本文区结束

Css:css是对html的板式进行控制没有css网页上面的内容将混乱不堪

这里介绍下css有几种引用方式对各个标签的格式的控制

1.通过关键字引用   pfont-size20px}这样p标签包围的所有内容都会被设置为20像素.

2.通过id属性引用#text1{font-size:20px}   这样这个规则将会应用到id=“text1”的元素上.

3.通过class属性引用.text1{font-size:  20px}这个规则将会应用到标签注明为class=text1”的标签上.

这是一个简单的网页

网页的源代码为

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="description" content="this is an html5 example" <meta name="keywords" content="HTML5.CSS3.JavaScript"> <title>html02</title> <style> p { font-size: 50px} </style> <link rel="stylesheet" href="mystyles.css"> </head> <body> <div id="wrapper"> <p style="font-size: 30px">My text:HX</p> <header id="main_header"> <h1>this is the main title of the website</h1> </header> <nav id="main_menu"> <ul> <li>home</li><li>photos</li><li>videos</li><li>contact</li>      </ul> </nav> <div id="container"> <section id="main_section"> <article> <header> <hgroup> <h1>Title of post one</h1> <h2>文章1的副标题</h2> </hgroup> <time datetime="2010-10-12" pubdate>posted 12-10-2011</time> </header> This is the text of my first post <figure> <img src="http://minkbooks.com/content/myimage.jpg"> <figcaptin> this is the image of the first post </figcaptin> </figure> <footer> <p>coments (0)</p> <address> <a href="http://www.jdgauchat.com">JD Gauchat</a></address> </footer> </article> <article> <header> <hgroup> <h1>Title of post two</h1> <h2>文章2的副标题</h2> </hgroup> <p>发布于 12-10-2011</p> <time datetime="2010-10-12" pubdate>posted 12-10-2011</time> </header> This is the text of my second post <footer> <p>coments (0)</p> </article> </section>  <aside id="main_aside">   <blockquote>Article number one</blockquote>   <blockquote>Article number two</blockquote>    </aside>  </div> <footer id="main_footer"> Copyright &copy; 2014-2015 </footer> </div> </body> </html>

网页的css代码

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="description" content="this is an html5 example" <meta name="keywords" content="HTML5.CSS3.JavaScript"> <title>html02</title> <style> p { font-size: 50px} </style> <link rel="stylesheet" href="mystyles.css"> </head> <body> <div id="wrapper"> <p style="font-size: 30px">My text:HX</p> <header id="main_header"> <h1>this is the main title of the website</h1> </header> <nav id="main_menu"> <ul> <li>home</li><li>photos</li><li>videos</li><li>contact</li>      </ul> </nav> <div id="container"> <section id="main_section"> <article> <header> <hgroup> <h1>Title of post one</h1> <h2>文章1的副标题</h2> </hgroup> <time datetime="2010-10-12" pubdate>posted 12-10-2011</time> </header> This is the text of my first post <figure> <img src="http://minkbooks.com/content/myimage.jpg"> <figcaptin> this is the image of the first post </figcaptin> </figure> <footer> <p>coments (0)</p> <address> <a href="http://www.jdgauchat.com">JD Gauchat</a></address> </footer> </article> <article> <header> <hgroup> <h1>Title of post two</h1> <h2>文章2的副标题</h2> </hgroup> <p>发布于 12-10-2011</p> <time datetime="2010-10-12" pubdate>posted 12-10-2011</time> </header> This is the text of my second post <footer> <p>coments (0)</p> </article> </section>  <aside id="main_aside">   <blockquote>Article number one</blockquote>   <blockquote>Article number two</blockquote>    </aside>  </div> <footer id="main_footer"> Copyright &copy; 2014-2015 </footer> </div> </body> </html>

这是正在做的计科官网的网页

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值