Default style sheet for HTML 4


/ Published in: CSS
Save to your folder(s)



Copy this code and paste it in your HTML
  1. html, address,
  2. blockquote,
  3. body, dd, div,
  4. dl, dt, fieldset, form,
  5. frame, frameset,
  6. h1, h2, h3, h4,
  7. h5, h6, noframes,
  8. ol, p, ul, center,
  9. dir, hr, menu, pre { display: block }
  10. li { display: list-item }
  11. head { display: none }
  12. table { display: table }
  13. tr { display: table-row }
  14. thead { display: table-header-group }
  15. tbody { display: table-row-group }
  16. tfoot { display: table-footer-group }
  17. col { display: table-column }
  18. colgroup { display: table-column-group }
  19. td, th { display: table-cell }
  20. caption { display: table-caption }
  21. th { font-weight: bolder; text-align: center }
  22. caption { text-align: center }
  23. body { margin: 8px }
  24. h1 { font-size: 2em; margin: .67em 0 }
  25. h2 { font-size: 1.5em; margin: .75em 0 }
  26. h3 { font-size: 1.17em; margin: .83em 0 }
  27. h4, p,
  28. blockquote, ul,
  29. fieldset, form,
  30. ol, dl, dir,
  31. menu { margin: 1.12em 0 }
  32. h5 { font-size: .83em; margin: 1.5em 0 }
  33. h6 { font-size: .75em; margin: 1.67em 0 }
  34. h1, h2, h3, h4,
  35. h5, h6, b,
  36. strong { font-weight: bolder }
  37. blockquote { margin-left: 40px; margin-right: 40px }
  38. i, cite, em,
  39. var, address { font-style: italic }
  40. pre, tt, code,
  41. kbd, samp { font-family: monospace }
  42. pre { white-space: pre }
  43. button, textarea,
  44. input, select { display: inline-block }
  45. big { font-size: 1.17em }
  46. small, sub, sup { font-size: .83em }
  47. sub { vertical-align: sub }
  48. sup { vertical-align: super }
  49. table { border-spacing: 2px; }
  50. thead, tbody,
  51. tfoot { vertical-align: middle }
  52. td, th { vertical-align: inherit }
  53. s, strike, del { text-decoration: line-through }
  54. hr { border: 1px inset }
  55. ol, ul, dir,
  56. menu, dd { margin-left: 40px }
  57. ol { list-style-type: decimal }
  58. ol ul, ul ol,
  59. ul ul, ol ol { margin-top: 0; margin-bottom: 0 }
  60. u, ins { text-decoration: underline }
  61. br:before { content: "\A" }
  62. :before, :after { white-space: pre-line }
  63. center { text-align: center }
  64. :link, :visited { text-decoration: underline }
  65. :focus { outline: thin dotted invert }
  66.  
  67. /* Begin bidirectionality settings (do not change) */
  68. BDO[DIR="ltr"] { direction: ltr; unicode-bidi: bidi-override }
  69. BDO[DIR="rtl"] { direction: rtl; unicode-bidi: bidi-override }
  70.  
  71. *[DIR="ltr"] { direction: ltr; unicode-bidi: embed }
  72. *[DIR="rtl"] { direction: rtl; unicode-bidi: embed }
  73.  
  74. @media print {
  75. h1 { page-break-before: always }
  76. h1, h2, h3,
  77. h4, h5, h6 { page-break-after: avoid }
  78. ul, ol, dl { page-break-before: avoid }
  79. }

URL: http://www.w3.org/TR/CSS21/sample.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.