--> "> <meta name="author" content="深度开源"> <meta name="keywords" content=", 特效, Windows Phone 8"> <link href="https://static.open-open.com/assets/fa/css/font-awesome.min.css?v=4.7.0" rel="stylesheet"> <link href="https://static.open-open.com/css/bootstrap.min.css?v=1.1" rel="stylesheet"> <link href="https://static.open-open.com/css/screen.css?v=1.1" rel="stylesheet"> <link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css" rel="stylesheet"> <!-- Just for debugging purposes. Don't actually copy these 2 lines! --> <!--[if lt IE 9]> <script type="text/javascript" src="https://static.open-open.com/js/ie8-responsive-file-warning.js"></script><![endif]--> <script type="text/javascript" src="https://static.open-open.com/js/ie-emulation-modes-warning.js?v=0.0001"></script> <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> <script type="text/javascript" src="https://static.open-open.com/js/html5shiv.min.js"></script> <script type="text/javascript" src="https://static.open-open.com/js/respond.min.js"></script> <![endif]--> </head> <body> <div class="wrapper bg-color-3"><div class="Topnav "> <div class=container> <div class="row"> <div class="col-sm"> </div> <div class="col-sm text-center"> <a href="../" class="navbar-brand top-logo"><span></span></a> </div> <div class="col-sm"> <div id="userNav" class="user float-right"> <div class=" "> <a class="link-login" href="javascript:void(null);">登录</a>  <a class="link-regist btn-signup" href="javascript:void(null);">注册</a></div> </div> </div> </div> </div> </div> <nav class="navbar navbar-expand-lg navbar-light ui-header"> <div class="container"> <div class="collapse navbar-collapse" id="globalNavbar"> <div class="ui-search order-2" id="topSearch"></div> <ul class="navbar-nav mr-auto order-1"> <li class="nav-item"><a class="nav-link" href="/">首页<span></span></a></li> <li class="nav-item "><a class="nav-link" href="/project/">项目<span></span></a></li> <li class="nav-item "><a class="nav-link" href="/lib/">经验<span></span></a></li> <li class="nav-item "><a class="nav-link" href="/code/">代码<span></span></a></li> <li class="nav-item"><a class="nav-link" href="/wenku/">文库<span></span></a></li> <li class="nav-item "><a class="nav-link" href="/solution/">问答<span></span></a></li> <li class="nav-item active"><a class="nav-link" href="/blog/">博客<span></span></a></li> <li class="nav-item "><a class="nav-link" href="/news/">资讯<span></span></a></li> </ul> </div> </div> </nav> <article id="readercontainer"> <div class="container"> <div class="side-widget sticky-top"> <div class="vote post-left ut-pt20"> <i class=" iconfont toggle-supports oo-vote-up " data-type="blog" data-num="0" data-id="3201" data-enable="" title="推荐"><span class="vote-count" data-num="0">0</span></i> <button type="button" id="favorites" data-type="blog" data-id="3201" data-title="html文档头对css影响" class="toggle-favorites btn btn-outline-secondary " title="收藏"><i class="fa fa-bookmark-o" aria-hidden="true"></i></button> <div class="bdsharebuttonbox ut-mt10"> <a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a> <a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a> <a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a> <a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a> </div> </div> </div> <div class="row ut-mt20"> <div class="col-md-9 article-body border-right"> <h1 class="headTit text-center">html文档头对css影响</h1> <div class="aut"> <a class="pop" data-avatar="https://simg.open-open.com/show/7b6e25d28c4e75f7a76f2cf9041ff793.jpg" data-avatar="https://simg.open-open.com/show/7b6e25d28c4e75f7a76f2cf9041ff793.jpg" data-name="" data-id="12839" href="https://user.open-open.com/u/12839"><i class="fa fa-user-o" aria-hidden="true"></i> </a> <span title=" 2011-03-04 08:16:15"> 14年前</span> </div> <div data-spy="scroll" data-target="#article-navbar" data-offset="0"> <DIV>最近开发中,遇到一个问题。body{font-size:12px}对<td></td>内文字不起作用。html文件的完整格式如下</DIV> <DIV><!-- <BR><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"<BR>"<a href="/misc/goto?guid=4959615501594206660" target="_blank">http://www.w3.org/TR/html4/loose.dtd</A>"><BR> --><BR><html><BR> <head><BR>  <title>font size test</title><BR>  <meta http-equiv="keywords" content="enter,your,keywords,here" /><BR>  <meta http-equiv="description" content="A short description of this page." /><BR>  <meta http-equiv="content-type" content="text/html; charset=UTF-8" /><BR>  <!-- <BR>  <style type="text/css"><BR>  body{<BR>    font-size:48px;<BR>    /*对td内元素无效,如果无html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"<BR>                                    "<a href="/misc/goto?guid=4959615501594206660" target="_blank">http://www.w3.org/TR/html4/loose.dtd</A>"><BR>          */<BR>  }<BR>  </style><BR>   --><BR>   <link rel="stylesheet" href="font.css" type="text/css"/><BR> </head><BR> <body><BR>  <p><BR>   p元素内文字<BR>  </p><BR>  <hr/><BR>  <table><BR>    <tr><BR>      <td>td内文字</td><BR>    </tr><BR>  </table><BR> </body><BR></html></DIV> <DIV>允许效果如下<IMG id=uchomelocalimg[] src="attachment/201103/4/12839_12992445736wjD.png"></DIV> <DIV>去掉文件头注释后</DIV> <DIV><BR><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"<BR>"<a href="/misc/goto?guid=4959615501594206660" target="_blank">http://www.w3.org/TR/html4/loose.dtd</A>"><BR><html><BR> <head><BR>  <title>font size test</title><BR>  <meta http-equiv="keywords" content="enter,your,keywords,here" /><BR>  <meta http-equiv="description" content="A short description of this page." /><BR>  <meta http-equiv="content-type" content="text/html; charset=UTF-8" /><BR>  <!-- <BR>  <style type="text/css"><BR>  body{<BR>    font-size:48px;<BR>    /*对td内元素无效,如果无html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"<BR>                                    "<a href="/misc/goto?guid=4959615501594206660" target="_blank">http://www.w3.org/TR/html4/loose.dtd</A>"><BR>          */<BR>  }<BR>  </style><BR>   --><BR>   <link rel="stylesheet" href="font.css" type="text/css"/><BR> </head><BR> <body><BR>  <p><BR>   p元素内文字<BR>  </p><BR>  <hr/><BR>  <table><BR>    <tr><BR>      <td>td内文字</td><BR>    </tr><BR>  </table><BR> </body><BR></html></DIV> <DIV>允许效果<IMG id=_uchome_localimg_1 src=""></DIV> <DIV>不带文件头时浏览器是怎么解析html文档的呢?</DIV><div class="uchome-message-pic"><img src="attachment/201103/4/12839_1299244574ge1H.png"><p></p></div> </div> </div> <div class="col-md-3"> <div class="ui-box ut-pd10" > <div class="title clearfix"><h3>博客分类</h3></div> <ul class="ui-list"> <li><span class="dot"></span><a target="_blank" class=" ellipsis" href="/blog/html-12839/"> html</a></li> <li><span class="dot"></span><a target="_blank" class=" ellipsis" href="/blog/qita-12839/"> 其它</a></li> </ul> </div> <div class="sticky-top hidden-xs ut-mt20 hidden-sm " id="article-navbar" role="complementary"><div class="title"><h3>目录</h3></div></div> </div> </div> </div> </article> <div class="relevant-content container"> <div class="row"> <div class="col-md-9 divided ui-items"> <div class="ui-tit ut-mt20"> <h4><span>推荐阅读</span></h4> <div class="float-right"> <a href="/blog/"><i class="fa fa-ellipsis-v"></i> 更多精彩內容</a> </div> </div> <div class="item ut-pd10 "> <div class="content ut-pr15"> <h2 class="header"><a href="/blog/5035946010385538449.html" target="_blank">html文档头对css影响</a></h2> <div class="description"> 最近开发中,遇到一个问题。body{font-size:12px}对<td></td>内文字不起作用。html文件的完整格式如下 <!-- <!DOCTYPE HTML PUBLIC "-//W... </div> <div class="extra"> <a class="aut" data-avatar="https://simg.open-open.com/show/7b6e25d28c4e75f7a76f2cf9041ff793.jpg" data-avatar="https://simg.open-open.com/show/7b6e25d28c4e75f7a76f2cf9041ff793.jpg" data-name=" chiang " data-id="12839" href="https://user.open-open.com/u/12839"> <img src="https://simg.open-open.com/show/7b6e25d28c4e75f7a76f2cf9041ff793.jpg" width="24"> chiang </a> </div> </div> <div class="rank"> <a href="/blog/5035946010385538449.html" class="pic distable-cell"> <img class="lazy ut-w150" src="https://static.open-open.com/img/fm.png" data-original="https://simg.open-open.com/show/a6e57b110201d49ea8ee4ea7cef21f1c"> </a> </div> </div> <div class="item ut-pd10 "> <div class="content ut-pr15"> <h2 class="header"><a href="/blog/5035946335169165780.html" target="_blank">Free HTML And CSS Web Templates Of February 2011</a></h2> <div class="description"> 1) Business Time Live Demo | Free Download 2) Acallia Development Live Demo | Free Download 3) Fr... </div> <div class="extra"> <a class="aut" data-avatar="https://simg.open-open.com/show/a845ed6bbfcdb5ae2baf03cb1d24b047.jpg" data-avatar="https://simg.open-open.com/show/a845ed6bbfcdb5ae2baf03cb1d24b047.jpg" data-name=" webphp " data-id="926" href="https://user.open-open.com/u/926"> <img src="https://simg.open-open.com/show/a845ed6bbfcdb5ae2baf03cb1d24b047.jpg" width="24"> webphp </a> </div> </div> </div> <div class="item ut-pd10 "> <div class="content ut-pr15"> <h2 class="header"><a href="/blog/5035947383423530776.html" target="_blank">男人就像HTML,女人如同CSS</a></h2> <div class="description"> 每个HTML都希望自己能呈现给别人亲和的引入注目的感觉,CSS可以帮助HTML实现这样的目的。 虽然没有CSS,HTML也可以自己完成同样的修饰,但是可能会一片混乱,不像有CSS的HTML那样,... </div> <div class="extra"> <a class="aut" data-avatar="https://simg.open-open.com/show/41771eadd463a28f6b623f3d3775f8fe.jpg" data-avatar="https://simg.open-open.com/show/41771eadd463a28f6b623f3d3775f8fe.jpg" data-name=" jopen " data-id="37924" href="https://user.open-open.com/u/37924"> <img src="https://simg.open-open.com/show/41771eadd463a28f6b623f3d3775f8fe.jpg" width="24"> jopen </a> </div> </div> </div> <div class="item ut-pd10 "> <div class="content ut-pr15"> <h2 class="header"><a href="/blog/5035945239773397906.html" target="_blank">10个免费的HTML/CSS网站模板</a></h2> <div class="description"> 1) Greeny 演 示 | 下 载 2) Real Estate Agency 演示 | 下载 3) Black Fox 演示 | 下载 4) Cyanspark Live Demo | F... </div> <div class="extra"> <a class="aut" data-avatar="https://static.open-open.com/img/avatar/privary/default.png" data-avatar="https://static.open-open.com/img/avatar/privary/default.png" data-name=" ajax " data-id="668" href="https://user.open-open.com/u/668"> <img src="https://static.open-open.com/img/avatar/privary/default.png" width="24"> ajax </a> </div> </div> <div class="rank"> <a href="/blog/5035945239773397906.html" class="pic distable-cell"> <img class="lazy ut-w150" src="https://static.open-open.com/img/fm.png" data-original="https://simg.open-open.com/show/d7710bf844dfacf0ae39a5938c2918a6"> </a> </div> </div> </div> </div> </div> </div> <footer > <div class="container py-5"> <div class="row"> <div class="col-md-3"> <h5>社区</h5> <div class="row"><div class="col-md-6"><a class="text-muted" href="/project/">项目</a></div><div class="col-md-6"><a class="text-muted" href="/solution/">问答</a></div><div class="col-md-6"><a class="text-muted" href="/wenku/">文库</a></div><div class="col-md-6"><a class="text-muted" href="/code/">代码</a></div><div class="col-md-6"><a class="text-muted" href="/lib/">经验</a></div><div class="col-md-6"><a class="text-muted" href="/news/">资讯</a></div></div> <ul class="list-unstyled text-small ut-mt20"><li><a class="text-muted" title=" 安卓开发专栏" target="_blank" href="http://www.open-open.com/lib/list/177">安卓开发专栏</a></li><li><a class="text-muted" href="http://www.open-open.com/lib/tag/开发者周刊" target="_blank" rel="tag">开发者周刊</a></li><li><a class="text-muted" href="http://www.open-open.com/lib/view/open1475497562965.html" target="_blank" rel="tag">Android Studio 使用推荐</a></li><li><a class="text-muted" href="http://www.open-open.com/lib/view/open1475497355674.html" target="_blank" rel="tag">Android开发推荐</a></li></ul> </div> <div class="col-md-3"> <h5>帮助中心</h5> <ul class="list-unstyled text-small"><li><a class="text-muted" href="/upload.html">文档上传须知</a></li></ul> <h5>关于我们</h5> <ul class="list-unstyled text-small"><li><a class="text-muted" href="/about.html">关于深度开源</a></li><li><a class="text-muted" href="/duty.html">免责声明</a></li><li><a class="text-muted" href="/contact.html">联系我们</a></li></ul> </div> <div class="col-md-6 text-center"><img class=center-block src="https://static.open-open.com/img/logo01.svg" width=190px alt="深度开源"><small class="d-block mb-3 text-muted ut-mt40">© 2006-2019 深度开源 —— 开源项目,开源代码,开源文档,开源新闻,开源社区  杭州精创信息技术有限公司  <br/><br/><img src="https://static.open-open.com/img/beian.png"/><a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=33018302001163">  浙公网安备 33018302001163 号</a>  <a target="_blank" href="https://www.miibeian.gov.cn/">浙ICP备09019653号-31</a></small></div> </div> </div> </footer> <div id="fTools"><span id="gotop"> <i class="fa fa-arrow-up" aria-hidden="true"></i> </span><span id="feedback" title="建议反馈"> <i class="fa fa-inbox" aria-hidden="true"></i></span></div> <!-- Bootstrap core JavaScript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> <script type="text/javascript" src="https://static.open-open.com/js/lib.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script> <script src="https://static.open-open.com/js/bootstrap.min.js"></script> <script type="text/javascript" src="https://static.open-open.com/js/base.js?v=1.02"></script> <script type="text/javascript" src="https://static.open-open.com/js/jq-plug.js?v=1.02"></script> <script> $(function () { JC.reminderPop();//弹出用户信息 $("#topSearch").searchInit(); $(".link-login").click(function(){ JC.lORr('login'); }); //用户登录状态 JC.setLogin(false); }); </script> <!-- JavaScript at the bottom for fast page loading --> <script type="text/javascript"> var ImageUploadUrl ="https://simg.open-open.com"; </script> <script type="text/javascript" src="//cdn.bootcss.com/jquery.form/3.51/jquery.form.min.js"></script> <script type="text/javascript" src="https://static.open-open.com/assets/ckeditor/ckeditor.js" charset="UTF-8"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script> <script type="text/javascript"> JC.init("","3201","blog",5); var slug = "5035946010385538449"; var title = "html文档头对css影响"; var username = ""; var useremail = ""; var summary = "最近开发中,遇到一个问题。body{font-size:12px}对<td></td>内文字不起作用。html文件的完整格式如下 <!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" " http://www.w3.org/TR/html4/loose.dtd "> --> <html> <head> <title>"; var num_page = "1"; var tagList = [{id:2012,name:"特效"},{id:934,name:"Windows Phone 8"} ]; var category_name = ""; var jc = {},fav=[]; $(function () { $('#article-navbar').contentIndex();//文章页目录索引 hljs.initHighlightingOnLoad(); }); </script> <script type="text/javascript" src="//cdn.bootcss.com/clipboard.js/1.5.15/clipboard.min.js"></script> <script type="text/javascript" src="https://static.open-open.com/js/show.js?v=0.001"></script> <script type="text/javascript" src="https://static.open-open.com/js/jq-plug.js?v=0.001"></script> <!-- end scripts --> </body> </html>