织梦CMS - 轻松建站从此开始!

WWW-36AB-COM【首页★新址】WWW-36AB-COM_日韩★WWW-36AB-COM

当前位置: 主页 > www-36ab-com > HTML >

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

时间:2010-04-07 09:29来源: 作者: 点击:
我们制作的每一个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> (责任编辑:admin)</td> </tr> </table> </div> <!-- /content --> <div class="dede_pages"> <ul class="pagelist"> </ul> </div> <!-- /pages --> <!-- //顶踩 --> <div class="newdigg" id="newdigg"> <div class="diggbox digg_good" onmousemove="this.style.backgroundPosition='left bottom';" onmouseout="this.style.backgroundPosition='left top';" onclick="javascript:postDigg('good',14)"> <div class="digg_act">顶一下</div> <div class="digg_num">(0)</div> <div class="digg_percent"> <div class="digg_percent_bar"><span style="width:0%"></span></div> <div class="digg_percent_num">0%</div> </div> </div> <div class="diggbox digg_bad" onmousemove="this.style.backgroundPosition='right bottom';" onmouseout="this.style.backgroundPosition='right top';" onclick="javascript:postDigg('bad',14)"> <div class="digg_act">踩一下</div> <div class="digg_num">(0)</div> <div class="digg_percent"> <div class="digg_percent_bar"><span style="width:0%"></span></div> <div class="digg_percent_num">0%</div> </div> </div> </div> <script language="javascript" type="text/javascript">getDigg(14);</script> <!-- //顶踩部份的源码结束 --> <!-- //分享代码开始 --> <!-- //分享代码结束 --> <div class="boxoff"> <strong>------分隔线----------------------------</strong> </div> <div class="handle"> <div class="context"> <ul> <li>上一篇:<a href='/a/webbase/html/2010/0407/13.html'>新手学习老知识(一)HTML语言基础</a> </li> <li>下一篇:<a href='/a/webbase/html/2010/0407/15.html'>网页文本排版知识:为正确的内容使用恰当的标签</a> </li> </ul> </div> <!-- /context --> <div class="actbox"> <ul> <li id="act-fav"><a href="/plus/stow.php?aid=14" target="_blank">收藏</a></li> <li id="act-err"><a href="/plus/erraddsave.php?aid=14&title=HTML网页初学者教程:讲解网页标题Title" target="_blank">挑错</a></li> <li id="act-pus"><a href="/plus/recommend.php?aid=14" target="_blank">推荐</a></li> <li id="act-pnt"><a href="#" onClick="window.print();">打印</a></li> </ul> </div> <!-- /actbox --> </div> <!-- /handle --> </div> <!-- /viewbox --> <!-- //AJAX评论区 --> <!-- //主模板必须要引入/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" onsubmit="return false;"> <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-content"> <script type="text/javascript"> //<![CDATA[ window.CKEDITOR_BASEPATH='/include/ckeditor/'; //]]> </script> <script type="text/javascript" src="/include/ckeditor/ckeditor.js?t=B8DJ5M3"></script> <script type="text/javascript">//<![CDATA[ CKEDITOR.config.ubb_smiley = {"高兴":"{s:1}","撇嘴":"{s:2}","抓狂":"{s:3}","汗":"{s:4}","惊恐":"{s:5}","奋斗":"{s:6}","疑问":"{s:7}","晕":"{s:8}","偷笑":"{s:9}","可爱":"{s:10}","疑惑":"{s:11}","酷":"{s:12}","暴汗":"{s:13}","呕吐":"{s:14}","大笑":"{s:15}","色":"{s:16}"} //]]></script> <textarea name="msg" rows="8" cols="60"></textarea> <script type="text/javascript">//<![CDATA[ CKEDITOR.replace('msg', {"extraPlugins":"dedepage,multipic,addon,bbcode","fontSize_sizes":"30\/30%;50\/50%;100\/100%;120\/120%;150\/150%;200\/200%;300\/300%","disableObjectResizing":"true","smiley_path":"\/images\/smiley\/","smiley_images":["1.gif","2.gif","3.gif","4.gif","5.gif","6.gif","7.gif","8.gif","9.gif","10.gif","11.gif","12.gif","13.gif","14.gif","15.gif","16.gif"],"smiley_descriptions":["高兴","撇嘴","抓狂","汗","惊恐","奋斗","疑问","晕","偷笑","可爱","疑惑","酷","暴汗","呕吐","大笑","色"],"toolbar":[["Source","-","Bold","Italic","Underline","-"],["FontSize","TextColor"],["Link","Unlink","Smiley"]],"height":100,"skin":"kama"}); //]]></script> </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="点击我更换图片" class="vdimg"/> <input type="checkbox" name="notuser" id="dcmp-submit-guest" /> <label for="dcmp-submit-guest" /> 匿名? </label> </div> <script language="javascript" type="text/javascript">CheckLogin();</script> <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 msg = CKEDITOR.instances.msg.getData(); 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(msg=='') { alert("评论内容不能为空!"); return; } if(f.validate) { if(f.validate.value=='') { alert("请填写验证码!"); return; } else { nvalidate = f.validate.value; } } if(msg.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', msg); myajax.SendPost2('/plus/feedback_ajax.php'); //msg = ''; CKEDITOR.instances.msg.setData(''); //taget_obj.removeAttribute('id'); 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; } function ajaxFeedback(aid, fid, type) { var taget_obj = $DE('ajaxfeedback_'+fid); if(taget_obj.innerHTML == '') { var myajax = new DedeAjax(taget_obj, true, true, '', 'x'); myajax.SendGet2("/plus/feedback.php?aid="+aid+"&fid="+fid+"&action=quote&type=ajax"); eval('var result = typeof CKEDITOR.instances.msg_'+fid); if(result != 'undefined') { // 删除实例 eval('var edit = CKEDITOR.instances.msg_'+fid); CKEDITOR.remove(edit); } CKEDITOR.replace(document.getElementById('msg_'+fid) , CKEDITOR.instances.msg.config); scroll(0, taget_obj.offsetTop - 120); var formname = 'f = document.ajaxfeedback_'+fid; eval(formname); if(f.validate) { if($DE('vdimg_'+fid)) $DE('vdimg_'+fid).src = "/include/vdimgck.php?"+f.validate.value; f.validate.value = ''; } DedeXHTTP = null; } } function ajaxQuotePost(fid) { var formname = 'f = document.ajaxfeedback_'+fid; eval(formname); //var f = document.formname; //var f = f[0]; 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>"; eval('var msg = CKEDITOR.instances.msg_'+fid+'.getData()'); if(f.validate) { if(f.validate.value=='') { alert("请填写验证码!"); return; } else { nvalidate = f.validate.value; } } var myajax = new DedeAjax(taget_obj, false, true, '', '', waithtml); if(f.notuser.checked) nnotuser = '1'; if(f.username) nusername = f.username.value; if(f.pwd) npwd = f.pwd.value; myajax.sendlang = 'gb2312'; myajax.AddKeyN('dopost', 'send'); myajax.AddKeyN('aid', '14'); myajax.AddKeyN('fid', f.fid.value); myajax.AddKeyN('type', 'ajax'); myajax.AddKeyN('comtype', f.comtype.value); myajax.AddKeyN('isconfirm','yes'); myajax.AddKeyN('typeid', f.typeid.value); myajax.AddKeyN('quotemsg', f.quotemsg.value); myajax.AddKeyN('validate', nvalidate); myajax.AddKeyN('notuser', nnotuser); myajax.AddKeyN('username', nusername); myajax.AddKeyN('pwd', npwd); myajax.AddKeyN('msg', msg); myajax.SendPost2('/plus/feedback_ajax.php'); //alert(f.quotemsg.value); if($DE('ajaxfeedback_'+fid).innerHTML != null) { $DE('ajaxfeedback_'+fid).innerHTML = ''; } scroll(0, taget_obj.offsetTop); } LoadCommets(1); </script> <!-- //评论内容区结束 --> </div> <!-- //左边内容结束 --> <!-- //右边内容开始 --> <div class="pright"> <div class="pright"> <div> <dl class="tbox"> <dt><strong>栏目列表</strong></dt> <dd> <ul class="d6"> <li><a href='/a/webbase/html/' class='thisclass'>HTML</a></li> <li><a href='/a/webbase/div-css/'>DIV&CSS</a></li> <li><a href='/a/webbase/javascript-ajax/'>Javascript/Ajax</a></li> <li><a href='/a/webbase/dreamweaver/'>Dreamweaver</a></li> </ul> </dd> </dl> </div> <div id="contentRtPicAD" style="margin:10px auto"></div> <div class="commend mt1"> <dl class="tbox light"> <dt class='light'><strong>推荐内容</strong></dt> <dd class='light'> <ul class="d4"> <li><a href="/a/webbase/html/2012/1130/343.html">措施文件位于/htdocs目录下</a> <p>一、简介如果你对Unix/Linux有所了解的话,你应该知道他们大都自带了C和C++ 的编译器...</p> </li> <li><a href="/a/webbase/html/2012/1130/320.html">已与本中心协议授权的媒体、网站</a> <p>根据《2012中国电子商务人才状况调查报告》(www.100ec.cn/zt/2010bgdz/)数据显示:电...</p> </li> <li><a href="/a/webbase/html/2012/1130/312.html">精通MySQL/Oracle/SQL Server数据库; 5、精</a> <p>软件所总体部研发岗位招聘启事 文章来源:软件研究所发布时间:2012-09-10【字号:】 ...</p> </li> <li><a href="/a/webbase/html/2010/0407/7.html">对于初学者不错的XHTML教程</a> <p>在这个教程里,你将学到HTML和XHTML之间的不同,以及如何将HTML转换为XHTML。毕竟XHTM...</p> </li> <li><a href="/a/webbase/html/2010/0407/10.html">表格中单元格之间分隔线的隐藏方法</a> <p>隐藏分隔线的诀窍在于rules,察看这三个表格的源代码,我们可以看到表格标签中都有rul...</p> </li> <li><a href="/a/webbase/html/2010/0407/18.html">浅谈XHTML(可扩展HTML)标准中CDATA</a> <p>近来,随着XHTML(可扩展HTML)标准的出现,script/标签也经历了一些改变。该标签不再...</p> </li> </ul> </dd> </dl> </div> <!-- /commend --> <div class="hot mt1"> <dl class="tbox light"> <dt class='light'><strong>热点内容</strong></dt> <dd class='light'> <ul class="c1 ico2"> <li><a href="/a/webbase/html/2012/1127/171.html">点击劫持可以诱使你宣布一条虚假</a></li> <li><a href="/a/webbase/html/2012/1127/194.html">从而熟悉asio的接口和编程套路</a></li> <li><a href="/a/webbase/html/2012/1201/361.html">如MFC、Qt等 5、熟悉Oracle或SQL</a></li> <li><a href="/a/webbase/html/2012/1130/320.html">已与本中心协议授权的媒体、网站</a></li> <li><a href="/a/webbase/html/2012/1130/338.html">了解防病毒技术体系; 4. 熟悉大</a></li> <li><a href="/a/webbase/html/2012/1127/176.html"> 5、针对用户的打击 上面都是针</a></li> <li><a href="/a/webbase/html/2012/1130/321.html">天津2012年自考“软件开发工具与</a></li> <li><a href="/a/webbase/html/2010/0407/92.html">DedeCMS V5.6 开发日志及新建议</a></li> <li><a href="/a/webbase/html/2012/1130/314.html">因为实现类要领的代码必需在要领</a></li> <li><a href="/a/webbase/html/2012/1127/169.html"> large-2.jpg 2x source media =</a></li> </ul> </dd> </dl> </div> <div id="contentRtPicAD2" style="margin:10px auto"></div> </div> <!-- /pright --> </div> <div id="innerfooterAD2" style="margin:10px auto; width:726px"></div> <!-- //底部模板 --> <div class="footer w960 center mt1 clear"> <!-- 为了支持织梦团队的发展,请您保留织梦内容管理系统的链接信息. 我们对支持织梦团队发展的朋友表示真心的感谢!织梦因您更精彩! --> <div class="footer_left"></div> <div class="footer_body"> <p class="powered"> Powered by <a href="http://www.dedecms.com" title="织梦内容管理系统(DedeCms)--国内最专业的PHP网站管理系统,轻松建站的首选利器。" target="_blank"><strong>DedeCMS_V57_GBK_SP1</strong></a> © 2004-2011 <a href="http://www.desdev.cn/" target="_blank">DesDev</a> Inc.<br /><div class="copyright">Copyright © 2002-2011 www-36ab-com 版权所有 <script src="http://s13.cnzz.com/stat.php?id=4513453&web_id=4513453&show=pic1" language="JavaScript"></script>  </div></p> <!-- /powered --> </div> <div class="footer_right"></div> </div> <!-- /footer --> </body> </html>