设为首页 - 加入收藏
广告 1000x90
您的当前位置:PCB下载站 > 网页基础 > HTML > 正文

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

来源: 编辑: 时间:2010-04-07

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

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

"">


我的第一个网页


我的第一个网页

你可以看到,我们已经增加从标签和标签开始的两个新元素(看看他们是怎么关闭的)。</p><p>头元素(从起始标签<head>到闭合标签</head>之间的内容)出现在主体元素(从起始标签< body>到闭合标签</body>之间的内容)之前,包含将在主体元素信息之前装载的信息。这些信息不会出现在浏览器窗口中。</p><p>随着我们进一步学习,你会看到更多能够插入头元素的其它元素,但最重要的还是标题元素。</p><p>如果你从浏览器查看这个网页(像前面一样已经保存和刷新),你可以看到“这是我的第一个网页”出现在浏览器窗口的标题栏。你键入的位于标题(title)标签的文本已经变成了这个文档的标题,惊奇吧?假设把这个网页增添到你的收藏夹或者书签,你会看到标题也会出现在这里。<br /></p> <p align="center"> </p> </div> <div class="dede_pagess"> <ul class="pagelist"> </ul> </div> <div class="ban_708"><img src="/skin/images/ad3.jpg" /></div> <div class="ban_708"><img src="/skin/images/ad2.jpg"/></div> <div class="b_box6">上一篇:<a href='/a/webbase/html/2010/0407/13.html'>新手学习老知识(一)HTML语言基础</a> <br />下一篇:<a href='/a/webbase/html/2010/0407/15.html'>网页文本排版知识:为正确的内容使用恰当的标签</a> </div> <div class="b_box7"> <p>相关文章:</p> <ul class="box"> </ul> </div> <div class="b_box7"> <p>相关推荐:</p> <ul class="box"> <li><em>[<a href='/a/webbase/html/'>HTML</a>]</em><a href="/a/webbase/html/2010/0407/1.html">学习HTML 4.0事件属性</a></li> <li><em>[<a href='/a/webbase/html/'>HTML</a>]</em><a href="/a/webbase/html/2010/0407/3.html">网页中应用表格爱好者</a></li> <li><em>[<a href='/a/webbase/html/'>HTML</a>]</em><a href="/a/webbase/html/2010/0407/6.html">网页制作初学者:认识XHTML DHTML SHTML的区别</a></li> <li><em>[<a href='/a/webbase/html/'>HTML</a>]</em><a href="/a/webbase/html/2010/0407/7.html">对于初学者不错的XHTML教程</a></li> <li><em>[<a href='/a/webbase/html/'>HTML</a>]</em><a href="/a/webbase/html/2010/0407/10.html">表格中单元格之间分隔线的隐藏方法</a></li> <li><em>[<a href='/a/webbase/html/'>HTML</a>]</em><a href="/a/webbase/html/2010/0407/18.html">浅谈XHTML(可扩展HTML)标准中CDATA</a></li> </ul> </div> <div class="b_box7"> <p>网友评论:</p> <div class="b_box6"> <!-- //主模板必须要引入/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 = 'utf-8'; 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"> <div class="g_box2 u_2"> <div class="t_1">栏目分类</div> <ul class="menu"> <li><a href='/a/webbase/html/' class='on'>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> <div class="clear"></div> </ul> </div> <div class="ban_251"><img src="/skin/images/ad2.jpg" width="250" height="250" /></div> <div class="g_box2 u_2"> <div class="t_1">最新文章</div> <ul class="b_box3 u_1"> <li><a href="/a/webbase/html/2010/0407/92.html">DedeCMS V5.6 开发日志及新建议提交贴</a></li> <li><a href="/a/webbase/html/2010/0407/12.html">新手学习老知识(二)HTML用好活动字幕标</a></li> <li><a href="/a/webbase/html/2010/0407/13.html">新手学习老知识(一)HTML语言基础</a></li> <li><a href="/a/webbase/html/2010/0407/14.html">HTML网页初学者教程:讲解网页标题Title</a></li> <li><a href="/a/webbase/html/2010/0407/15.html">网页文本排版知识:为正确的内容使用恰</a></li> <li><a href="/a/webbase/html/2010/0407/16.html">使用XHTML按标准重构网站</a></li> <li><a href="/a/webbase/html/2010/0407/17.html">快速精通网页框架FRAME</a></li> <li><a href="/a/webbase/html/2010/0407/18.html">浅谈XHTML(可扩展HTML)标准中CDATA</a></li> <li><a href="/a/webbase/html/2010/0407/19.html">HTML基础知识:学习掌握HTML 标准属性</a></li> <li><a href="/a/webbase/html/2010/0407/20.html">HTML基础教程:学习掌握HTML 元素</a></li> </ul> </div> <div class="ban_251"><img src="/skin/images/ad2.jpg" width="250" height="250" /></div> <div class="g_box2 u_2"> <div class="t_1">热门文章</div> <ul class="b_box1"> <li><a href="/a/webbase/html/2010/0407/92.html">DedeCMS V5.6 开发日志及新建议提交贴</a></li> <li><a href="/a/webbase/html/2010/0407/5.html">实例学习网页制作中常用的网页表单的应</a></li> <li><a href="/a/webbase/html/2010/0407/6.html">网页制作初学者:认识XHTML DHTML SHTML的区</a></li> <li><a href="/a/webbase/html/2010/0407/8.html">介绍span和div标签的使用</a></li> <li><a href="/a/webbase/html/2010/0407/1.html">学习HTML 4.0事件属性</a></li> <li><a href="/a/webbase/html/2010/0407/2.html">初学者:XHTML常用标签的基本应用指南</a></li> <li><a href="/a/webbase/html/2010/0407/3.html">网页中应用表格爱好者</a></li> <li><a href="/a/webbase/html/2010/0407/4.html">初学者很好的参考:HTML标签详尽讲解</a></li> <li><a href="/a/webbase/html/2010/0407/7.html">对于初学者不错的XHTML教程</a></li> <li><a href="/a/webbase/html/2010/0407/9.html">HTML教程:建立超级连接</a></li> </ul> </div> <div class="ban_251"><img src="/skin/images/ad2.jpg" width="250" height="250" /></div> </div> <div class="clear"></div> </div> <div class="ban_1001"><img src="/skin/images/ad1.jpg" /></div> <div class="foot"> <p><a href="http://www.mobantianxia.com/" target="_blank">模板天下</a> www.mobantianxia.com 联系QQ:498872301 邮箱:498872301@qq.com</p> <p>Copyright © 2002-2011 DEDECMS. 织梦科技 版权所有 Power by DedeCms</p> </div> <a href="#0" class="cd-top">Top</a> </body> </html>