第4章 XHTML 基础

第4章 XHTML 基础

ID:37595306

大小:516.50 KB

页数:54页

时间:2019-05-12

第4章  XHTML 基础_第1页
第4章  XHTML 基础_第2页
第4章  XHTML 基础_第3页
第4章  XHTML 基础_第4页
第4章  XHTML 基础_第5页
资源描述:

《第4章 XHTML 基础》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、网站规划与网页设计王建平fysfwjp@163.com1吕梁高等专科学校汾阳师范分校4.1XHTML简介4.2XHTML文档的基本结构4.3网页文件的创建过程4.4段落标记4.5文字标记4.6超链接4.7图像4.8表格4.9框架(多窗口页面)4.10表单第4章XHTML基础24.1.1XHTML的产生HTML是HypertextMarkupLanguage(超文本标记语言)的缩写,是一种为普通文件中某些字句加上标识的语言,其目的在于运用标记(tag)对文件达到预期的效果。它是构成Web页面(Page),用来表示Web页面的符号标

2、记语言。HTML语言是建立网页的规范或标准,从它出现发展到现在,规范不断完善,功能越来越强。但是依然有缺陷和不足,人们仍在不断的改进它,使它更加便于控制和有弹性,以适应网络上的应用需求。2000年,W3C组织公布发行了XHTML1.0版本。XHTML1.0是一种在HTML4.0基础上优化和改进的新语言,目的是基于XML应用。XHTML是一种增强了的HTML,它的可扩展性和灵活性将适应未来网络应用更多的需求。4.1XHTML简介34.1.2XHTML的优点XHTML1.0作为一种语言,它的内容既符合XML,并且如果依照一些简单的指

3、导方针,也能被HTML4.0用户代理程序识别。开发者将它们的文档移植成为XHTML1.0,会得到以下好处。1.XHTML文档遵从XML标准XHTML文档遵从XML标准,用标准的XML工具很容易查看、编辑和检验它们。XHTML文档可以在现有的HTML4.0代理用户程序中使用,也可以在新的XHTML用户代理程序中使用,在后者中使用可以达到与前者同样或更好的效果。2.在XHTML文档中可使用更多的应用程序XHTML文档中使用的应用程序(如Script和Applet)可以是HTML的文档对象模型DOM(DocumentObjectMod

4、el),也可以是XML的文档对象模型。4.1XHTML简介44.1.3XHTML代码规范1.所有的标记都必须有一个相应的结束标记以前在HTML中,用户可以打开许多标签,如

,而不一定写对应的

来关闭它们,但在XHTML中这是不合法的。XHTML要求有严谨的结构,所有标签必须关闭。如果是单独不成对的标签,则在标签最后加一个“/”来关闭它,例如,
2.所有标签的元素和属性的名字都必

5、须使用小写XHTML对大小写是敏感的,和<TITLE>是不同的标签。XHTML要求所有的标签和属性的名字都必须使用小写字母。例如,<BODY>必须写成<body>。大小写夹杂也是不被认可的,通常在Dreamweaver中自动生成的属性名onMouseOver也必须修改成onmouseover。4.1XHTML简介54.1.3XHTML代码规范3.所有的标记都必须合理嵌套同样,因为XHTML要求有严谨的结构,因此所有的嵌套都必须按顺序嵌套,例如,以前用户可以这样编写的代码:<p><b></p>/b>但按照XHTML要</p><p>6、求必须修改为:<p><b></b>/p>就是说,一层一层的嵌套必须是严格对称的。4.所有的属性必须用引号括起来在HTML中,用户可以不用给属性值加引号“"”,但是在XHTML中,它们必须被加引号。例如,在HTML中可写为:<inputname=guitartype=checkboxvalue=guitar>而按照XHTML要求必须修改为:<inputname="guitar"type="checkbox"value="guitar"/>4.1XHTML简介64.1.3XHTML代码规范5.特殊符号“<”、“>”和“&”用编码表示</p><p>7、小于(<)号,不是标签一部分的,必须被编码为<;大于(>)号,不是标签一部分的,必须被编码为>;(&)号,不是实体的一部分的,必须被编码为&。6.每个属性必须赋值XHTML规定所有属性都必须有一个值,没有值的就重复本身。例如:<tdnowrap><inputtype="checkbox"name="shirt"value="medium"checked>按照XHTML要求必须修改为:<tdnowrap="nowrap"><inputtype="checkbox"name="shirt"value="mediu</p><p>8、m"checked="checked"/></td>7.不要在注释内容中使用“--”“--”只能出现在XHTML注释的开头和结束位置。4.1XHTML简介71.标记XHTML文档由标记和被标记的内容组成。标记(tag)能产生所需的各种效果。格式为:<标记>受标记</p> </div> <div class="mt-3 bg-white"> <div class="d-lg-block d-none px-3 px-lg-4 py-3 border-bottom text-center font-18"> 当前文档最多预览五页,下载文档查看全文 </div> <div class="detail-fixed-feature d-none d-lg-block" id="detailFixedFeatureBox"> <div class="px-3 px-lg-4 py-3 d-flex align-items-center justify-content-between fixed-feature-box" id="detailFixedFeature"> <div class="d-lg-flex d-none align-items-center"> <div> <a class="btn btn-outline-danger article-state" href="javascript:;" data-id="37595306" data-code="438274" data-title="第4章 XHTML 基础"> <span>侵权申诉</span> </a> <button type="button" class="btn btn-outline-secondary with-light ml-2" data-toggle="modal" data-target="#reportModal" data-id="37595306"><span>举报</span></button> </div> <nav class="d-flex align-items-center ml-4" id="anchorPoint"> <a href="javascript:;" class="btn btn-light anchor-pre px-2"><i class="iconfont text-muted"></i></a> <div class="text-muted mb-0 pre-point-list" id="prePointList"> <a class="px-2 active nav-link" href="#anchorImg0">1</a> <a class="px-2 nav-link" href="#anchorImg1">1</a> <a class="px-2 nav-link" href="#anchorImg2">2</a> <a class="px-2 nav-link" href="#anchorImg3">3</a> <a class="px-2 nav-link" href="#anchorImg4">4</a> <a class="px-2 nav-link" href="#anchorImg5">5</a> / <span class="px-2" id="prePageNums">54</span> </div> <a href="javascript:;" class="btn btn-light anchor-next px-2"><i class="iconfont text-muted"></i></a> </nav> </div> <div class="d-flex align-items-center"> <p class="d-lg-block d-none font-14 text-black-50 mb-0 mr-2">此文档下载收益归作者所有</p> <button class="btn btn-danger detail-download-btn px-3 ml-0 font-16" data-btn="downloadfile" style="width:128px;height:40px;" data-id="37595306" data-price="2000" data-size="516.50 KB" data-page="54页" data-type="ppt" data-binddown="true" data-isold="new_content" data-vip="0" data-title="第4章 XHTML 基础">下载文档</button> </div> </div> </div> </div> <div class="d-block d-lg-none px-3 px-lg-4 py-3 border-bottom text-center font-14" style="color:#999">当前文档最多预览五页,下载文档查看全文</div> <button class="btn d-block w-100 d-lg-none btn-danger detail-download-btn px-3 ml-0 font-16" data-btn="downloadfile" data-id="37595306" data-price="2000" data-size="516.50 KB" data-page="54页" data-type="ppt" data-binddown="true" data-isold="new_content" data-vip="0" data-title="第4章 XHTML 基础">点击下载本文档 </button> </div> <div class="px-3 px-lg-4 py-3 bg-white mt-3"> <ul class="nav custom-tab border-bottom" id="myTab" role="tablist"> <li class="nav-item" role="presentation"> <a class="nav-link active px-0 mr-4 font-16 font-weight-light pb-3" id="tips-tab" data-toggle="tab" href="#showTips" role="tab" aria-controls="showTips" aria-selected="true">版权提示</a> </li> <li class="nav-item" role="presentation"> <a class="nav-link px-0 pb-3 font-16 font-weight-light text-black-50" href="/d-37595306.html" >下载文档</a> </li> <dl class="flex-grow-1 mb-0 d-lg-none"> <li class="ml-3 float-right d-lg-none"> <button type="button" class="btn btn-light" data-toggle="modal" data-target="#reportModal" data-id="37595306"><span>举报</span></button> </li> </dl> </ul> <div class="tab-content with-content pt-3" id="myTabContent"> <div class="tab-pane fade show active font-14" id="showTips" role="tabpanel" aria-labelledby="showTips-tab"> 温馨提示: <br> 1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。<br> 2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。<br> 3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。<br> 4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。 <br> </div> </div> </div> </div> <div class="detail-sidebar d-none d-lg-block"> <div id="columnDetailSiderRight"> <div class="detail-yourlike mt-0 pb-2" id="relativeArticle"> <div class="border-bottom py-2 d-flex align-items-center justify-content-between"> <h5 class="font-16">相关文章</h5> <a class="font-14 hover-letter-spacing" href="/ucenter/search/index.html?text=第4章 XHTML 基础" target="_blank" rel="nofollow">更多<i class="iconfont font-12 pl-1"></i></a> </div> <ul class="font-14 like-list"> <li class=""> <a class="text-ellipsis office-icon text-dark office-icon-doc" href="/p-9429594.html" title="xhtml+css布局之xhtml应用小结" target="_blank">xhtml+css布局之xhtml应用小结</a> </li> <li class=""> <a class="text-ellipsis office-icon text-dark office-icon-doc" href="/p-9493852.html" title="xhtml教程-针对初学者的xhtml基础" target="_blank">xhtml教程-针对初学者的xhtml<span class="text-danger">基</span><span class="text-danger">础</span></a> </li> <li class=""> <a class="text-ellipsis office-icon text-dark office-icon-doc" href="/p-9685893.html" title="xhtml+css布局之xhtml应用小结--." target="_blank">xhtml+css布局之xhtml应用小结--.</a> </li> <li class=""> <a class="text-ellipsis office-icon text-dark office-icon-docx" href="/p-17894990.html" title="陌小夕-经典xhtml全套详解教程第1章 xhtml学前准备" target="_blank">陌小夕-经典xhtml全套详解教程<span class="text-danger">第</span>1<span class="text-danger">章</span>xhtml学前准备</a> </li> <li class=""> <a class="text-ellipsis office-icon text-dark office-icon-doc" href="/p-22379257.html" title="xhtml教程--." target="_blank">xhtml教程--.</a> </li> <li class=""> <a class="text-ellipsis office-icon text-dark office-icon-ppt" href="/p-27713836.html" title="[工学]第05章 javascript与xhtml文档" target="_blank">[工学]<span class="text-danger">第</span>05<span class="text-danger">章</span>javascript与xhtml文档</a> </li> <li class=""> <a class="text-ellipsis office-icon text-dark office-icon-ppt" href="/p-36697325.html" title="《XHTML基础教程》PPT课件" target="_blank">《<span class="text-danger">X</span><span class="text-danger">H</span><span class="text-danger">T</span><span class="text-danger">M</span><span class="text-danger">L</span><span class="text-danger">基</span><span class="text-danger">础</span>教程》PP<span class="text-danger">T</span>课件</a> </li> <li class=""> <a class="text-ellipsis office-icon text-dark office-icon-ppt" href="/p-36873065.html" title="《XHTML基础教程》PPT课件" target="_blank">《<span class="text-danger">X</span><span class="text-danger">H</span><span class="text-danger">T</span><span class="text-danger">M</span><span class="text-danger">L</span><span class="text-danger">基</span><span class="text-danger">础</span>教程》PP<span class="text-danger">T</span>课件</a> </li> <li class=""> <a class="text-ellipsis office-icon text-dark office-icon-doc" href="/p-37013274.html" title="divcss布局基础:html标记(二)-xhtml教程" target="_blank">divcss布局<span class="text-danger">基</span><span class="text-danger">础</span>:html标记(二)-xhtml教程</a> </li> <li class=""> <a class="text-ellipsis office-icon text-dark office-icon-ppt" href="/p-39996498.html" title="xhtml基础教程" target="_blank">xhtml<span class="text-danger">基</span><span class="text-danger">础</span>教程</a> </li> </ul> </div> <div class="detail-yourlike pb-2"> <div class="border-bottom py-2"> <h5 class="font-16">相关标签</h5> </div> <ul class="font-14 like-list d-flex flex-wrap"> <a class="search-tag" href="/tags/540091/" target="_blank">基础</a> </ul> </div> <script src="/d/js/acmsd/thea1.js"></script> </div> </div> </div> <footer> <div class="container d-none d-lg-block mb-4"> <div class="d-flex justify-content-between footer-nav"> <ul class="d-flex foot-nav"> <li> <h5>常见问题</h5> <a class=text-decoration-none href=/help/wenti/upload/ target=_blank> 关于上传 </a><a class=text-decoration-none href=/help/wenti/xiazai/ target=_blank> 关于下载 </a><a class=text-decoration-none href=/help/wenti/qinquan/ target=_blank> 关于侵权 </a><a class=text-decoration-none href=/help/wenti/fenxaing/ target=_blank> 分享文档赚钱教程 </a> </li> <li> <h5>关于我们</h5> <a class=text-decoration-none href=/help/about/wzjs/ target=_blank> 网站介绍 </a><a class=text-decoration-none href=/help/about/gywm/ target=_blank> 关于我们 </a><a class=text-decoration-none href=/help/about/lxwm/ target=_blank> 联系我们 </a> </li> <li> <h5>版权问题</h5> <a class=text-decoration-none href=/help/banquan/bqsm/ target=_blank> 版权声明 </a><a class=text-decoration-none href=/help/banquan/qqcl/ target=_blank> 侵权处理 </a><a class=text-decoration-none href=/help/banquan/mzsm/ target=_blank> 免责声明 </a> </li> <li> <h5>协议条款</h5> <a class=text-decoration-none href=/help/xieyi/yhxy/ target=_blank> 用户协议 </a><a class=text-decoration-none href=/help/xieyi/fwtk/ target=_blank> 用户服务条款 </a><a class=text-decoration-none href=/help/xieyi/ysbh/ target=_blank> 用户隐私保护 </a> </li> <li> <h5>网站导航</h5> <a class="text-decoration-none help-nav-item" href="/sitemaps.xml" data-name="网站地图" target="_blank">网站地图</a> <a class="text-decoration-none help-nav-item" href="/list.html" data-name="全部分类" target="_blank">全部分类</a> <a class="text-decoration-none help-nav-item" href="/sitemaps/index.html" data-name="资源地图" target="_blank">资源地图</a> </li> </ul> <div class="foot-qrcode d-flex"> <div> <div class="subsitute-bg"><img src="https://www.wenku365.com/d/file/2022/07-08/f23df57d987ef7ad9acb33fe5abf9854.jpg"></div> <p>关注公众号<br></p> </div> </div> </div> </div> <div class="footer-copyright"> <p><a href="/" target="_blank">天天文库</a>站为“文档C2C交易模式”,即用户上传的文档直接卖给(下载)用户,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有【成交的100%(原创)】。</p> <p>本站是网络服务平台方,若您的权利被侵害,侵权客服QQ:3074922707 欢迎举报。</p> <p>Copyright 2004-2021 <a href="https://www.wenku365.com/" target="_blank">wenku365.com</a> All Rights Reserved <a href="https://beian.miit.gov.cn/#/Integrated/index" rel="nofollow" target="_blank">闽ICP备15016911号-5 </a></p> <p>闽公网安备 <a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=35052402000320" rel="nofollow" target="_blank">35052402000320</a></p> <p> <a href="https://www.wenku365.com/zt.html" target="_blank">专题文集</a> <a href="https://www.wenku365.com/zt-90007.html" target="_blank">丨职业培训</a> <a href="https://www.wenku365.com/zt-90005.html" target="_blank">丨实用范文</a> <a href="https://www.wenku365.com/zt-90010.html" target="_blank">丨商业材料</a> <a href="https://www.wenku365.com/zt-90013.html" target="_blank">丨合同协议</a> <a href="https://www.wenku365.com/zt-90009.html" target="_blank">丨PPT专题</a></p> </div> </footer> <script src="//static.wenku365.com/wenku365/js/global.min.js?"></script> <script src="//static.wenku365.com/wenku365/js/clipboard.min.js?"></script> <script src="//static.wenku365.com/wenku365/js/jquery.treeview.js?"></script> <script src="//static.wenku365.com/wenku365/js/jquery.share.min.js?"></script> <script src="//static.wenku365.com/wenku365/js/common.min.js?"></script> <script src="//static.wenku365.com/wenku365/js/downloadFile.js?"></script> <script src="//static.wenku365.com/wenku365/js/loginWindow.js?"></script> <script src="//static.wenku365.com/wenku365/js/windowRecharge.js?"></script> <script src="//static.wenku365.com/wenku365/js/viewer.min.js?"></script> <script src="//static.wenku365.com/wenku365/js/detail.js?"></script> <!-- 2023-05-07 07:37:50 --> </body> </html>