これは w3c 組織による HTML4 のスタイル提案です 残念ながら、ブラウザーは独自のプライベート属性を追加し、標準をクラウド化しています。しかし、それは依然として私たちにとって非常に参考となる重要性を持っています。
付録 D. HTML 4 のデフォルト スタイル シート
この付録は参考情報であり、規範的なものではありません。
このスタイル シートでは、すべての HTML 4 ([HTML4]) 要素の一般的な書式設定について説明します。現在の UA の実践に関する広範な調査。開発者は、これを実装のデフォルトのスタイル シートとして使用することをお勧めします。
一部の HTML 要素の完全な表現は、置換された要素 (「img」、 "object ")、スクリプト要素 ("script"、"applet")、フォーム コントロール要素、およびフレーム要素。
その他の要素については、従来のプレゼンテーションを CSS で記述できますが、ソリューションでは要素が削除されます。たとえば、FONT 要素は、CSS 宣言を他の要素 (DIV など) に添付することで置き換えることができます。同様に、プレゼンテーション属性 (TABLE の「border」属性など) の従来の表現も CSS で記述できますが、そのマークアップは CSS で記述されます。ソースドキュメントを変更する必要があります。
<code class="css">html, address, <br>blockquote, <br>body, dd, div, <br>dl, dt, fieldset, form, <br>frame, frameset, <br>h1, h2, h3, h4, <br>h5, h6, noframes, <br>ol, p, ul, <span class="value"><font color="#0000ff">center</font></span>, <br>dir, hr, menu, <span class="value"><font color="#0000ff">pre</font></span> { <span class="attrib"><strong><font color="#000080">display</font></strong></span>: <span class="value"><font color="#0000ff">block</font></span> } <br>li { <span class="attrib"><strong><font color="#000080">display</font></strong></span>: <span class="value"><font color="#0000ff">list-item</font></span> } <br>head { <span class="attrib"><strong><font color="#000080">display</font></strong></span>: <span class="value"><font color="#0000ff">none</font></span> } <br>table { <span class="attrib"><strong><font color="#000080">display</font></strong></span>: table } <br>tr { <span class="attrib"><strong><font color="#000080">display</font></strong></span>: <span class="value"><font color="#0000ff">table-row</font></span> } <br>thead { <span class="attrib"><strong><font color="#000080">display</font></strong></span>: <span class="value"><font color="#0000ff">table-header-group</font></span> } <br>tbody { <span class="attrib"><strong><font color="#000080">display</font></strong></span>: <span class="value"><font color="#0000ff">table-row-group</font></span> } <br>tfoot { <span class="attrib"><strong><font color="#000080">display</font></strong></span>: <span class="value"><font color="#0000ff">table-footer-group</font></span> } <br>col { <span class="attrib"><strong><font color="#000080">display</font></strong></span>: <span class="value"><font color="#0000ff">table-column</font></span> } <br>colgroup { <span class="attrib"><strong><font color="#000080">display</font></strong></span>: <span class="value"><font color="#0000ff">table-column-group</font></span> } <br>td, th { <span class="attrib"><strong><font color="#000080">display</font></strong></span>: <span class="value"><font color="#0000ff">table-cell</font></span> } <br><span class="value"><font color="#0000ff">caption</font></span> { <span class="attrib"><strong><font color="#000080">display</font></strong></span>: <span class="value"><font color="#0000ff">table-caption</font></span> } <br>th { <span class="attrib"><strong><font color="#000080">font-weight</font></strong></span>: <span class="value"><font color="#0000ff">bolder</font></span>; <span class="attrib"><strong><font color="#000080">text-align</font></strong></span>: <span class="value"><font color="#0000ff">center</font></span> } <br><span class="value"><font color="#0000ff">caption</font></span> { <span class="attrib"><strong><font color="#000080">text-align</font></strong></span>: <span class="value"><font color="#0000ff">center</font></span> } <br>body { <span class="attrib"><strong><font color="#000080">margin</font></strong></span>: <span class="number"><font color="#ff0000">8px</font></span> } <br>h1 { <span class="attrib"><strong><font color="#000080">font-size</font></strong></span>: <span class="number"><font color="#ff0000">2em</font></span>; <span class="attrib"><strong><font color="#000080">margin</font></strong></span>: .<span class="number"><font color="#ff0000">67em</font></span> <span class="number"><font color="#ff0000">0</font></span> } <br>h2 { <span class="attrib"><strong><font color="#000080">font-size</font></strong></span>: <span class="number"><font color="#ff0000">1.5em</font></span>; <span class="attrib"><strong><font color="#000080">margin</font></strong></span>: .<span class="number"><font color="#ff0000">75em</font></span> <span class="number"><font color="#ff0000">0</font></span> } <br>h3 { <span class="attrib"><strong><font color="#000080">font-size</font></strong></span>: <span class="number"><font color="#ff0000">1.17em</font></span>; <span class="attrib"><strong><font color="#000080">margin</font></strong></span>: .<span class="number"><font color="#ff0000">83em</font></span> <span class="number"><font color="#ff0000">0</font></span> } <br>h4, p, <br>blockquote, ul, <br>fieldset, form, <br>ol, dl, dir, <br>menu { <span class="attrib"><strong><font color="#000080">margin</font></strong></span>: <span class="number"><font color="#ff0000">1.12em</font></span> <span class="number"><font color="#ff0000">0</font></span> } <br>h5 { <span class="attrib"><strong><font color="#000080">font-size</font></strong></span>: .<span class="number"><font color="#ff0000">83em</font></span>; <span class="attrib"><strong><font color="#000080">margin</font></strong></span>: <span class="number"><font color="#ff0000">1.5em</font></span> <span class="number"><font color="#ff0000">0</font></span> } <br>h6 { <span class="attrib"><strong><font color="#000080">font-size</font></strong></span>: .<span class="number"><font color="#ff0000">75em</font></span>; <span class="attrib"><strong><font color="#000080">margin</font></strong></span>: <span class="number"><font color="#ff0000">1.67em</font></span> <span class="number"><font color="#ff0000">0</font></span> } <br>h1, h2, h3, h4, <br>h5, h6, b, <br>strong { <span class="attrib"><strong><font color="#000080">font-weight</font></strong></span>: <span class="value"><font color="#0000ff">bolder</font></span> } <br>blockquote { <span class="attrib"><strong><font color="#000080">margin-left</font></strong></span>: <span class="number"><font color="#ff0000">40px</font></span>; <span class="attrib"><strong><font color="#000080">margin-right</font></strong></span>: <span class="number"><font color="#ff0000">40px</font></span> } <br>i, cite, em, <br>var, address { <span class="attrib"><strong><font color="#000080">font-style</font></strong></span>: <span class="value"><font color="#0000ff">italic</font></span> } <br><span class="value"><font color="#0000ff">pre</font></span>, tt, <span class="value"><font color="#0000ff">code</font></span>, <br>kbd, samp { <span class="attrib"><strong><font color="#000080">font-family</font></strong></span>: monospace } <br><span class="value"><font color="#0000ff">pre</font></span> { <span class="attrib"><strong><font color="#000080">white-space</font></strong></span>: <span class="value"><font color="#0000ff">pre</font></span> } <br>button, textarea, <br>input, select { <span class="attrib"><strong><font color="#000080">display</font></strong></span>: <span class="value"><font color="#0000ff">inline</font></span>-<span class="value"><font color="#0000ff">block</font></span> } <br>big { <span class="attrib"><strong><font color="#000080">font-size</font></strong></span>: <span class="number"><font color="#ff0000">1.17em</font></span> } <br><span class="value"><font color="#0000ff">small</font></span>, <span class="value"><font color="#0000ff">sub</font></span>, sup { <span class="attrib"><strong><font color="#000080">font-size</font></strong></span>: .<span class="number"><font color="#ff0000">83em</font></span> } <br><span class="value"><font color="#0000ff">sub</font></span> { <span class="attrib"><strong><font color="#000080">vertical-align</font></strong></span>: <span class="value"><font color="#0000ff">sub</font></span> } <br>sup { <span class="attrib"><strong><font color="#000080">vertical-align</font></strong></span>: <span class="value"><font color="#0000ff">super</font></span> } <br>table { <span class="attrib"><strong><font color="#000080">border-spacing</font></strong></span>: <span class="number"><font color="#ff0000">2px</font></span>; } <br>thead, tbody, <br>tfoot { <span class="attrib"><strong><font color="#000080">vertical-align</font></strong></span>: <span class="value"><font color="#0000ff">middle</font></span> } <br>td, th, tr { <span class="attrib"><strong><font color="#000080">vertical-align</font></strong></span>: inherit } <br>s, strike, del { <span class="attrib"><strong><font color="#000080">text-decoration</font></strong></span>: <span class="value"><font color="#0000ff">line-through</font></span> } <br>hr { <span class="attrib"><strong><font color="#000080">border</font></strong></span>: <span class="number"><font color="#ff0000">1px</font></span> <span class="value"><font color="#0000ff">inset</font></span> } <br>ol, ul, dir, <br>menu, dd { <span class="attrib"><strong><font color="#000080">margin-left</font></strong></span>: <span class="number"><font color="#ff0000">40px</font></span> } <br>ol { <span class="attrib"><strong><font color="#000080">list-style-type</font></strong></span>: <span class="value"><font color="#0000ff">decimal</font></span> } <br>ol ul, ul ol, <br>ul ul, ol ol { <span class="attrib"><strong><font color="#000080">margin-top</font></strong></span>: <span class="number"><font color="#ff0000">0</font></span>; <span class="attrib"><strong><font color="#000080">margin-bottom</font></strong></span>: <span class="number"><font color="#ff0000">0</font></span> } <br>u, ins { <span class="attrib"><strong><font color="#000080">text-decoration</font></strong></span>: <span class="value"><font color="#0000ff">underline</font></span> } <br>br:before { <span class="attrib"><strong><font color="#000080">content</font></strong></span>: <span class="string"><font color="#008080">"\A"</font></span>; <span class="attrib"><strong><font color="#000080">white-space</font></strong></span>: <span class="value"><font color="#0000ff">pre</font></span>-line } <br><span class="value"><font color="#0000ff">center</font></span> { <span class="attrib"><strong><font color="#000080">text-align</font></strong></span>: <span class="value"><font color="#0000ff">center</font></span> } <br>:link, :visited { <span class="attrib"><strong><font color="#000080">text-decoration</font></strong></span>: <span class="value"><font color="#0000ff">underline</font></span> } <br>:focus { <span class="attrib"><strong><font color="#000080">outline</font></strong></span>: <span class="value"><font color="#0000ff">thin</font></span> <span class="value"><font color="#0000ff">dotted</font></span> <span class="value"><font color="#0000ff">invert</font></span> } <br> <br><span class="mlcom"><font color="#4040c2">/* Begin bidirectionality settings (do not change) */</font></span> <br>BDO[DIR=<span class="string"><font color="#008080">"ltr"</font></span>] { <span class="attrib"><strong><font color="#000080">direction</font></strong></span>: <span class="value"><font color="#0000ff">ltr</font></span>; <span class="attrib"><strong><font color="#000080">unicode-bidi</font></strong></span>: <span class="value"><font color="#0000ff">bidi-override</font></span> } <br>BDO[DIR=<span class="string"><font color="#008080">"rtl"</font></span>] { <span class="attrib"><strong><font color="#000080">direction</font></strong></span>: <span class="value"><font color="#0000ff">rtl</font></span>; <span class="attrib"><strong><font color="#000080">unicode-bidi</font></strong></span>: <span class="value"><font color="#0000ff">bidi-override</font></span> } <br> <br>*[DIR=<span class="string"><font color="#008080">"ltr"</font></span>] { <span class="attrib"><strong><font color="#000080">direction</font></strong></span>: <span class="value"><font color="#0000ff">ltr</font></span>; <span class="attrib"><strong><font color="#000080">unicode-bidi</font></strong></span>: <span class="value"><font color="#0000ff">embed</font></span> } <br>*[DIR=<span class="string"><font color="#008080">"rtl"</font></span>] { <span class="attrib"><strong><font color="#000080">direction</font></strong></span>: <span class="value"><font color="#0000ff">rtl</font></span>; <span class="attrib"><strong><font color="#000080">unicode-bidi</font></strong></span>: <span class="value"><font color="#0000ff">embed</font></span> } <br> <br>@media <span class="value"><font color="#0000ff">print</font></span> { <br> h1 { <span class="attrib"><strong><font color="#000080">page-break-before</font></strong></span>: <span class="value"><font color="#0000ff">always</font></span> } <br> h1, h2, h3, <br> h4, h5, h6 { <span class="attrib"><strong><font color="#000080">page-break-after</font></strong></span>: <span class="value"><font color="#0000ff">avoid</font></span> } <br> ul, ol, dl { <span class="attrib"><strong><font color="#000080">page-break-before</font></strong></span>: <span class="value"><font color="#0000ff">avoid</font></span> } <br>}</code>