Default style sheet for HTML 4

Source: Internet
Author: User

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 {display: block}
Li {display: list-item}
Head {display: none}
Table {display: table}
Tr {display: table-row}
Thead {display: table-header-group}
Tbody {display: table-row-group}
Tfoot {display: table-footer-group}
Col {display: table-column}
Colgroup {display: table-column-group}
Td, th {display: table-cell}
Caption {display: table-caption}
Th {font-weight: bolder; text-align: center}
Caption {text-align: center}
Body {margin: 8px}
H1 {font-size: 2em; margin:. 67em 0}
H2 {font-size: 1.5em; margin:. 75em 0}
H3 {font-size: 1.17em; margin:. 83em 0}
H4, p,
Blockquote, ul,
Fieldset, form,
Ol, dl, dir,
Menu {margin: 1.12em 0}
H5 {font-size:. 83em; margin: 1.5em 0}
H6 {font-size:. 75em; margin: 1.67em 0}
H1, h2, h3, h4,
H5, h6, B,
Strong {font-weight: bolder}
Blockquote {margin-left: 40px; margin-right: 40px}
I, cite, em,
Var, address {font-style: italic}
Pre, tt, code,
Kbd, samp {font-family: monospace}
Pre {white-space: pre}
Button, textarea,
Input, select {display: inline-block}
Big {font-size: 1.17em}
Small, sub, sup {font-size:. 83em}
Sub {vertical-align: sub}
Sup {vertical-align: super}
Table {border-spacing: 2px ;}
Thead, tbody,
Tfoot {vertical-align: middle}
Td, th {vertical-align: inherit}
S, strike, del {text-decoration: line-through}
Hr {border: 1px inset}
Ol, ul, dir,
Menu, dd {margin-left: 40px}
Ol {list-style-type: decimal}
Ol ul, ul ol,
Ul, ol {margin-top: 0; margin-bottom: 0}
U, ins {text-decoration: underline}
Br: before {content: "\ "}
: Before,: after {white-space: pre-line}
Center {text-align: center}
: Link,: visited {text-decoration: underline}
: Focus {outline: thin dotted invert}

/* Begin bidirectionality settings (do not change )*/
BDO [DIR = "ltr"] {direction: ltr; unicode-bidi: bidi-override}
BDO [DIR = "rtl"] {direction: rtl; unicode-bidi: bidi-override}

* [DIR = "ltr"] {direction: ltr; unicode-bidi: embed}
* [DIR = "rtl"] {direction: rtl; unicode-bidi: embed}

@ Media print {
H1 {page-break-before: always}
H1, h2, h3,
H4, h5, h6 {page-break-after: avoid}
Ul, ol, dl {page-break-before: avoid}
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.