w3c组织给出html4的样式建议

所属分类: 网页制作 / HTML/Xhtml 阅读数: 477
收藏 0 赞 0 分享
这是w3c组织给出html4的样式建议,可惜浏览器们都加上自己的私有属性,让标准成了浮云。不过对于我们仍然是很有参考意义的。
Appendix D. Default style sheet for HTML 4
This appendix is informative, not normative.

This style sheet describes the typical formatting of all HTML 4 ([HTML4]) elements based on extensive research into current UA practice. Developers are encouraged to use it as a default style sheet in their implementations.

The full presentation of some HTML elements cannot be expressed in CSS 2.1, including replaced elements ("img", "object"), scripting elements ("script", "applet"), form control elements, and frame elements.

For other elements, the legacy presentation can be described in CSS but the solution removes the element. For example, the FONT element can be replaced by attaching CSS declarations to other elements (e.g., DIV). Likewise, legacy presentation of presentational attributes (e.g., the "border" attribute on TABLE) can be described in CSS, but the markup in the source document must be changed.

html, address, 
blockquote, 
body, dd, div, 
dl, dt, fieldset, form, 
frame, frameset, 
h1, h2, h3, h4, 
h5, h6, noframes, 
ol, p, ul, center
dir, hr, menu, pre   { displayblock } 
li              { displaylist-item } 
head            { displaynone } 
table           { display: table } 
tr              { displaytable-row } 
thead           { displaytable-header-group } 
tbody           { displaytable-row-group } 
tfoot           { displaytable-footer-group } 
col             { displaytable-column } 
colgroup        { displaytable-column-group } 
td, th          { displaytable-cell } 
caption         { displaytable-caption } 
th              { font-weightboldertext-aligncenter } 
caption         { text-aligncenter } 
body            { margin8px } 
h1              { font-size2emmargin: .67em 0 } 
h2              { font-size1.5emmargin: .75em 0 } 
h3              { font-size1.17emmargin: .83em 0 } 
h4, p, 
blockquote, ul, 
fieldset, form, 
ol, dl, dir, 
menu            { margin1.12em 0 } 
h5              { font-size: .83emmargin1.5em 0 } 
h6              { font-size: .75emmargin1.67em 0 } 
h1, h2, h3, h4, 
h5, h6, b, 
strong          { font-weightbolder } 
blockquote      { margin-left40pxmargin-right40px } 
i, cite, em, 
var, address    { font-styleitalic } 
pre, tt, code
kbd, samp       { font-family: monospace } 
pre             { white-spacepre } 
button, textarea, 
input, select   { displayinline-block } 
big             { font-size1.17em } 
smallsub, sup { font-size: .83em } 
sub             { vertical-alignsub } 
sup             { vertical-alignsuper } 
table           { border-spacing2px; } 
thead, tbody, 
tfoot           { vertical-alignmiddle } 
td, th, tr      { vertical-align: inherit } 
s, strike, del  { text-decorationline-through } 
hr              { border1px inset } 
ol, ul, dir, 
menu, dd        { margin-left40px } 
ol              { list-style-typedecimal } 
ol ul, ul ol, 
ul ul, ol ol    { margin-top0margin-bottom0 } 
u, ins          { text-decorationunderline } 
br:before       { content"\A"white-spacepre-line } 
center          { text-aligncenter } 
:link, :visited { text-decorationunderline } 
:focus          { outlinethin dotted invert } 
 
/* Begin bidirectionality settings (do not change) */ 
BDO[DIR="ltr"]  { directionltrunicode-bidibidi-override } 
BDO[DIR="rtl"]  { directionrtlunicode-bidibidi-override } 
 
*[DIR="ltr"]    { directionltrunicode-bidiembed } 
*[DIR="rtl"]    { directionrtlunicode-bidiembed } 
 
@media print { 
  h1            { page-break-beforealways } 
  h1, h2, h3, 
  h4, h5, h6    { page-break-afteravoid } 
  ul, ol, dl    { page-break-beforeavoid } 
}
Appendix D. Default style sheet for HTML 4
更多精彩内容其他人还在看

HTML常用标签大全及html标签的特点

本篇文章给大家整理些关于html常用标签大全及html标签的特点,希望对大家学习html相关知识有所帮助,感兴趣的朋友一起学习吧
收藏 0 赞 0 分享

HTML页面3秒后自动跳转的三种常见方法

在项目中,我们经常会遇到这样一个功能:如何实现页面N秒后自动跳转。其实方法很简单,下面小编通过本文给大家分享HTML页面3秒后自动跳转的三种常见方法,对html页面3秒后自动跳转的相关知识感兴趣的朋友一起学习吧
收藏 0 赞 0 分享

HTML实现页面自动跳转的五种方法

本文通过五个实例给大家介绍html实现页面自动跳转的五种方法,对html页面跳转相关知识感兴趣的朋友一起学习吧
收藏 0 赞 0 分享

举例讲解HTML中META标签的一些使用技巧

这篇文章主要介绍了HTML中META标签的一些使用技巧,共举了10个小例子,HTML5中META标签也有演进,可以说是HTML学习中的重要知识点,需要的朋友可以参考下
收藏 0 赞 0 分享

dns-prefetch是什么 前端优化:DNS预解析提升页面速度

在网页体验中我们常会遇到这种情况,即在调用百度联盟、谷歌联盟以及当前网页所在域名外的域名文件时会遇到请求延时非常严重的情况。那么有没有方法去解决这种请求严重延时的现象呢
收藏 0 赞 0 分享

HTML初学者适用的十五条最佳实践

这篇文章主要为HTML初学者推荐了适用的三十条最佳实践,感兴趣的小伙伴们可以参考一下
收藏 0 赞 0 分享

深入解析HTML的table表格标签与相关的换行问题

这篇文章主要介绍了HTML的table表格标签与相关的换行问题,文中给出了强制换行和强制不换行的解决方案,需要的朋友可以参考下
收藏 0 赞 0 分享

HTML代码书写规范指南

这篇文章主要介绍了HTML代码书写规范指南,包括对格式和字符编码以及注释等方面的一些普遍约定俗成的约束,需要的朋友可以参考下
收藏 0 赞 0 分享

利用iframe在网页中显示天气附效果截图

这篇文章主要介绍了利用iframe在网页中显示天气,这个功能还是比较实用的,实现起来也比较容易,需要的朋友可以看看
收藏 0 赞 0 分享

HTML 中的 dl(dt,dd)、ul(li)、ol(li) 使用方法

这篇文章主要介绍了HTML 中的 dl(dt,dd)、ul(li)、ol(li) 使用方法,需要的朋友可以参考下
收藏 0 赞 0 分享
查看更多