设为首页 - 加入收藏 织梦模板之家(Mubanzhijia.Com),专注织梦模板设计制作!
热搜: dedecms5.1 sp1 免费版
广告位
当前位置: 主页 > 网页基础 > HTML >

HTML网页初学者教程:讲解网页标题Title

2010-04-07 09:29 [HTML] 来源于:
导读:我们制作的每一个HTML网页都应该有文档标题。那么到底如何设置标题呢?这个教程就作为网页初学者的入门吧!给你的文档增加一个标题,按照下面改变你的代码:!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//ENhttp://www.w3.org/

我们制作的每一个HTML网页都应该有文档标题。那么到底如何设置标题呢?这个教程就作为网页初学者的入门吧!

给你的文档增加一个标题,按照下面改变你的代码:

"">


我的第一个网页


我的第一个网页

你可以看到,我们已经增加从标签和标签开始的两个新元素(看看他们是怎么关闭的)。</p><p>头元素(从起始标签<head>到闭合标签</head>之间的内容)出现在主体元素(从起始标签< body>到闭合标签</body>之间的内容)之前,包含将在主体元素信息之前装载的信息。这些信息不会出现在浏览器窗口中。</p><p>随着我们进一步学习,你会看到更多能够插入头元素的其它元素,但最重要的还是标题元素。</p><p>如果你从浏览器查看这个网页(像前面一样已经保存和刷新),你可以看到“这是我的第一个网页”出现在浏览器窗口的标题栏。你键入的位于标题(title)标签的文本已经变成了这个文档的标题,惊奇吧?假设把这个网页增添到你的收藏夹或者书签,你会看到标题也会出现在这里。<br /></p> <p align="center"> </p> <p style="text-align:right;">(编辑:admin)</p> </td> </tr> </table> </div> <div class="dede_pagess"> <ul class="pagelist"> </ul> </div> <div class="ad-690"><img src="http://demo.mubanzhijia.com/ad_img/mubanzhijia_ad4.jpg" width="500" height="200" /></div> <div class="g-box10"> <div class="t-2">相关内容</div> <ul class="b-box12"> </ul> <ul class="b-box13"> <div class="cl"></div> </ul> </div> <div class="g-box10"> <div class="t-2">网友评论</div> <div class="b-box14"> <!-- //主模板必须要引入/include/dedeajax2.js --> <a name='postform'></a> <div class="mt1"> <dl class="tbox"> <dt> <strong>发表评论</strong> <span class="more"></span> </dt> <dd> <div class="dede_comment_post"> <form action="#" method="post" name="feedback"> <input type="hidden" name="dopost" value="send" /> <input type="hidden" name="comtype" value="comments"> <input type="hidden" name="aid" value="14" /> <input type="hidden" name="fid" id='feedbackfid' value="0" /> <div class="dcmp-title"> <small>请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。</small> </div><!-- /dcmp-title --> <div class="dcmp-stand"> <strong>评价:</strong> <input type="radio" name="feedbacktype" checked="1" value="feedback" id="dcmp-stand-neu" /><label for="dcmp-stand-neu"><img src="/templets/default/images/cmt-neu.gif" />中立</label> <input type="radio" name="feedbacktype" value="good" id="dcmp-stand-good" /><label for="dcmp-stand-good"><img src="/templets/default/images/cmt-good.gif" />好评</label> <input type="radio" name="feedbacktype" value="bad" id="dcmp-stand-bad" /><label for="dcmp-stand-bad"><img src="/templets/default/images/cmt-bad.gif" />差评</label> </div><!-- /dcmp-stand --> <div class="clr"></div> <div class="dcmp-mood"> <strong>表情:</strong> <ul> </ul> </div><!-- /dcmp-mood --> <div class="dcmp-content"> <textarea cols="60" name="msg" rows="5" class="ipt-txt"></textarea> </div><!-- /dcmp-content --> <div class="dcmp-post"><!--未登陆--> <div class="dcmp-userinfo" id="_ajax_feedback"> 用户名:<input type="text" name="username" size="16" class="ipt-txt" style="text-transform: uppercase;"/> 验证码:<input type="text" name="validate" size="4" class="ipt-txt" style="text-transform:uppercase;"/><img src= "/include/vdimgck.php" id="validateimg" style="cursor:pointer" onclick="this.src=this.src+\'?\'" title="点击我更换图片" alt="点击我更换图片" /> <input type="checkbox" name="notuser" id="dcmp-submit-guest" /><label for="dcmp-submit-guest" />匿名? </label> </div> <div class="dcmp-submit"> <button type="button" onClick='PostComment()'>发表评论</button> </div> </div> </form> </div> </dd> </dl> </div><!-- //评论表单区结束 --> <!-- //评论内容区 --> <a name='commettop'></a> <div class="mt1"> <dl class="tbox"> <dt> <strong>最新评论</strong> <span class="more"><a href="/plus/feedback.php?aid=14">进入详细评论页>></a></span> </dt> <!-- //这两个ID的区块必须存在,否则JS会出错 --> <dd id='commetcontentNew'></dd> <dd id='commetcontent'></dd> </dl> </div> <!-- //由于评论载入时使用异步传输,因此必须在最后一步加载(DIGG和评论框须放在评论内容前面) //如果一定需要提前的把myajax.SendGet改为myajax.SendGet2,但可能会引起页面阻滞 --> <script language='javascript'> function LoadCommets(page) { var taget_obj = document.getElementById('commetcontent'); var waithtml = "<div style='line-height:50px'><img src='/images/loadinglit.gif' />评论加载中...</div>"; var myajax = new DedeAjax(taget_obj, true, true, '', 'x', waithtml); myajax.SendGet2("/plus/feedback_ajax.php?dopost=getlist&aid=14&page="+page); DedeXHTTP = null; } function PostComment() { var f = document.feedback; var nface = '6'; var nfeedbacktype = 'feedback'; var nvalidate = ''; var nnotuser = ''; var nusername = ''; var npwd = ''; var taget_obj = $DE('commetcontentNew'); var waithtml = "<div style='line-height:30px'><img src='/images/loadinglit.gif' />正在发送中...</div>"; if(f.msg.value=='') { alert("评论内容不能为空!"); return; } if(f.validate) { if(f.validate.value=='') { alert("请填写验证码!"); return; } else { nvalidate = f.validate.value; } } if(f.msg.value.length > 500) { alert("你的评论是不是太长了?请填写500字以内的评论。"); return; } if(f.feedbacktype) { for(var i=0; i < f.feedbacktype.length; i++) if(f.feedbacktype[i].checked) nfeedbacktype = f.feedbacktype[i].value; } if(f.face) { for(var j=0; j < f.face.length; j++) if(f.face[j].checked) nface = f.face[j].value; } if(f.notuser.checked) nnotuser = '1'; if(f.username) nusername = f.username.value; if(f.pwd) npwd = f.pwd.value; var myajax = new DedeAjax(taget_obj, false, true, '', '', waithtml); myajax.sendlang = 'gb2312'; myajax.AddKeyN('dopost', 'send'); myajax.AddKeyN('aid', '14'); myajax.AddKeyN('fid', f.fid.value); myajax.AddKeyN('face', nface); myajax.AddKeyN('feedbacktype', nfeedbacktype); myajax.AddKeyN('validate', nvalidate); myajax.AddKeyN('notuser', nnotuser); myajax.AddKeyN('username', nusername); myajax.AddKeyN('pwd', npwd); myajax.AddKeyN('msg', f.msg.value); myajax.SendPost2('/plus/feedback_ajax.php'); f.msg.value = ''; f.fid.value = 0; if(f.validate) { if($DE('validateimg')) $DE('validateimg').src = "/include/vdimgck.php?"+f.validate.value; f.validate.value = ''; } } function quoteCommet(fid) { document.feedback.fid.value = fid; } LoadCommets(1); </script><!-- //评论内容区结束 --> </div> </div> </div> </div> <div class="right-1 fr"> <div class="g-box8"> <div class="t-2">推荐文章</div> <ul> <li> <p><a href="/a/webbase/html/2010/0407/1.html" target="_blank">学习HTML 4.0事件属性</a></p> <div class="dis_pi"> <a href="/a/webbase/html/2010/0407/1.html" target="_blank"><img src="/images/defaultpic.gif" alt="学习HTML 4.0事件属性" /></a> <span class="pic_r">HTML 4.0的新特性之一是使HTML事件触发浏览器中的行为...<a href="/a/webbase/html/2010/0407/1.html">[详细]</a></span> </div> </li> <li> <p><a href="/a/webbase/html/2010/0407/3.html" target="_blank">网页中应用表格爱好者</a></p> <div class="dis_pi"> <a href="/a/webbase/html/2010/0407/3.html" target="_blank"><img src="/images/defaultpic.gif" alt="网页中应用表格爱好者" /></a> <span class="pic_r">你认为已经知道怎么制做表格了吧。当然,你已经了解 t...<a href="/a/webbase/html/2010/0407/3.html">[详细]</a></span> </div> </li> <li> <p><a href="/a/webbase/html/2010/0407/6.html" target="_blank">网页制作初学者:认识XHTML DHTML SHTM</a></p> <div class="dis_pi"> <a href="/a/webbase/html/2010/0407/6.html" target="_blank"><img src="/images/defaultpic.gif" alt="网页制作初学者:认识XHTML DHTML SHTML的区别" /></a> <span class="pic_r">我们经常会在一个技术性网站或BBS见到这三个东东:XHT...<a href="/a/webbase/html/2010/0407/6.html">[详细]</a></span> </div> </li> <li> <p><a href="/a/webbase/html/2010/0407/7.html" target="_blank">对于初学者不错的XHTML教程</a></p> <div class="dis_pi"> <a href="/a/webbase/html/2010/0407/7.html" target="_blank"><img src="/images/defaultpic.gif" alt="对于初学者不错的XHTML教程" /></a> <span class="pic_r">在这个教程里,你将学到HTML和XHTML之间的不同,以及...<a href="/a/webbase/html/2010/0407/7.html">[详细]</a></span> </div> </li> <li> <p><a href="/a/webbase/html/2010/0407/10.html" target="_blank">表格中单元格之间分隔线的隐藏方法</a></p> <div class="dis_pi"> <a href="/a/webbase/html/2010/0407/10.html" target="_blank"><img src="/images/defaultpic.gif" alt="表格中单元格之间分隔线的隐藏方法" /></a> <span class="pic_r">隐藏分隔线的诀窍在于rules,察看这三个表格的源代码...<a href="/a/webbase/html/2010/0407/10.html">[详细]</a></span> </div> </li> <li> <p><a href="/a/webbase/html/2010/0407/18.html" target="_blank">浅谈XHTML(可扩展HTML)标准中CDATA</a></p> <div class="dis_pi"> <a href="/a/webbase/html/2010/0407/18.html" target="_blank"><img src="/images/defaultpic.gif" alt="浅谈XHTML(可扩展HTML)标准中CDATA" /></a> <span class="pic_r">近来,随着XHTML(可扩展HTML)标准的出现,script/标...<a href="/a/webbase/html/2010/0407/18.html">[详细]</a></span> </div> </li> </ul> </div> <script type="text/javascript">jQuery(".g-box8").slide({ titCell:"li",triggerTime:0 }); </script> <div class="ad-250"><img src="http://demo.mubanzhijia.com/ad_img/mubanzhijia_ad8.jpg" width="250" height="250" alt="广告位" /></div> <div class="g-box3 u-3"> <div class="t-1">热点阅读</div> <ul class="b-box2"> <li><a href="/a/webbase/html/2010/0407/92.html" target="_blank">DedeCMS V5.6 开发日志及新建议提</a></li> <li><a href="/a/webbase/html/2010/0407/1.html" target="_blank">学习HTML 4.0事件属性</a></li> <li><a href="/a/webbase/html/2010/0407/2.html" target="_blank">初学者:XHTML常用标签的基本应用</a></li> <li><a href="/a/webbase/html/2010/0407/3.html" target="_blank">网页中应用表格爱好者</a></li> <li><a href="/a/webbase/html/2010/0407/4.html" target="_blank">初学者很好的参考:HTML标签详尽讲</a></li> <li><a href="/a/webbase/html/2010/0407/5.html" target="_blank">实例学习网页制作中常用的网页表单</a></li> <li><a href="/a/webbase/html/2010/0407/6.html" target="_blank">网页制作初学者:认识XHTML DHTML </a></li> <li><a href="/a/webbase/html/2010/0407/7.html" target="_blank">对于初学者不错的XHTML教程</a></li> <li><a href="/a/webbase/html/2010/0407/8.html" target="_blank">介绍span和div标签的使用</a></li> <li><a href="/a/webbase/html/2010/0407/9.html" target="_blank">HTML教程:建立超级连接</a></li> </ul> </div> <div class="ad-250"><img src="http://demo.mubanzhijia.com/ad_img/mubanzhijia_ad6.jpg" width="250" height="250" alt="广告位" /></div> <div class="g-box9"> <div class="t-2">随机内容</div> <ul class="b-box10"> <!--此处调用指定栏目-5最新图文信息2条--> <li><p><a href="/a/webbase/html/2010/0407/19.html" target="_blank">HTML基础知识:学</a></p><a href="/a/webbase/html/2010/0407/19.html" target="_blank"><img src="/images/defaultpic.gif" alt="HTML基础知识:学习掌握HTML 标准属性" /></a></li> <!--此处调用指定栏目-5最新图文信息2条--> <li><p><a href="/a/webbase/html/2010/0407/1.html" target="_blank">学习HTML 4.0事件</a></p><a href="/a/webbase/html/2010/0407/1.html" target="_blank"><img src="/images/defaultpic.gif" alt="学习HTML 4.0事件属性" /></a></li> <!--此处调用指定栏目-5最新图文信息2条--> <li><p><a href="/a/webbase/html/2010/0407/16.html" target="_blank">使用XHTML按标准</a></p><a href="/a/webbase/html/2010/0407/16.html" target="_blank"><img src="/images/defaultpic.gif" alt="使用XHTML按标准重构网站" /></a></li> <!--此处调用指定栏目-5最新图文信息2条--> <li><p><a href="/a/webbase/html/2010/0407/15.html" target="_blank">网页文本排版知识</a></p><a href="/a/webbase/html/2010/0407/15.html" target="_blank"><img src="/images/defaultpic.gif" alt="网页文本排版知识:为正确的内容使用恰当的标签" /></a></li> <div class="cl"></div> </ul> <ul class="b-box7"> <li><a href="/a/webbase/html/2010/0407/8.html" target="_blank">介绍span和div标签的使用</a></li> <li><a href="/a/webbase/html/2010/0407/10.html" target="_blank">表格中单元格之间分隔线的隐藏方法</a></li> <li><a href="/a/webbase/html/2010/0407/18.html" target="_blank">浅谈XHTML(可扩展HTML)标准中CDATA</a></li> <li><a href="/a/webbase/html/2010/0407/5.html" target="_blank">实例学习网页制作中常用的网页表单的应用</a></li> <li><a href="/a/webbase/html/2010/0407/92.html" target="_blank">DedeCMS V5.6 开发日志及新建议提交贴</a></li> <li><a href="/a/webbase/html/2010/0407/12.html" target="_blank">新手学习老知识(二)HTML用好活动字幕标</a></li> </ul> </div> </div> <div class="cl"></div> </div> <div class="ad-960"><img src="http://demo.mubanzhijia.com/ad_img/mubanzhijia_ad12.jpg" width="960" alt="广告位" /></div> <div class="footer"> <p>Copyright © 2002-2017 98676.com. 开奖结果 版权所有 <a href=http://www.dedecms.com target='_blank'>Power by DedeCms</a>  </p> </div> <p align="center"><a href="http://www.903637.com">排列五开奖结果</a>,<a href="http://www.903637.com">168开奖结果</a>,<a href="http://www.903637.com">3d开奖结果</a>,<a href="http://www.903637.com">3d彩开奖结果</a>,<a href="http://www.903637.com">七星彩开奖查询结果</a>,<a href="http://www.903637.com">博彩中特网903637.com</a>。<script language="javascript" src="http://count50.51yes.com/click.aspx?id=506242495&logo=9" charset="gb2312"></script></p> </body> </html>