Posted By


mrjohnsly on 07/27/09

Tagged


Statistics


Viewed 3241 times
Favorited by 6 user(s)

HTML5 CSS Reset


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

All credit to Richard Clarke, code taken from HTML 5 Doctor. Posted here for quick access from TextMate.


Copy this code and paste it in your HTML
  1. /*
  2. html5doctor.com Reset Stylesheet
  3. v1.2
  4. 2009-07-15
  5. Author: Richard Clark - http://richclarkdesign.com
  6. */
  7.  
  8. html, body, div, span, object, iframe,
  9. h1, h2, h3, h4, h5, h6, p, blockquote, pre,
  10. a, abbr, address, cite, code,
  11. del, dfn, em, img, ins, kbd, q, samp,
  12. small, strong, sub, sup, var,
  13. b, i,
  14. dl, dt, dd, ol, ul, li,
  15. fieldset, form, label, legend,
  16. table, caption, tbody, tfoot, thead, tr, th, td,
  17. article, aside, dialog, figure, footer, header,
  18. hgroup, menu, nav, section, menu,
  19. time, mark, audio, video, source {
  20. margin:0;
  21. padding:0;
  22. border:0;
  23. outline:0;
  24. font-size:100%;
  25. vertical-align:baseline;
  26. background:transparent;
  27. }
  28. body {
  29. line-height:1;
  30. }
  31.  
  32. article, aside, dialog, figure, footer, header,
  33. hgroup, menu, nav, section, menu {
  34. display:block;
  35. }
  36.  
  37. nav ul {
  38. list-style:none;
  39. }
  40.  
  41. blockquote, q {
  42. quotes:none;
  43. }
  44.  
  45. blockquote:before, blockquote:after,
  46. q:before, q:after {
  47. content:'';
  48. content:none;
  49. }
  50.  
  51. ins {
  52. background-color:#ff9;
  53. text-decoration:none;
  54. }
  55.  
  56. mark {
  57. background-color:#ff9;
  58. font-style:italic;
  59. font-weight:bold;
  60. }
  61.  
  62. del {
  63. text-decoration: line-through;
  64. }
  65.  
  66. abbr[title], dfn[title] {
  67. border-bottom:1px dotted #000;
  68. cursor:help;
  69. }
  70.  
  71. /* tables still need 'cellspacing="0"' in the markup */
  72. table {
  73. border-collapse:collapse;
  74. border-spacing:0;
  75. }
  76.  
  77. hr {
  78. display:block;
  79. height:1px;
  80. border:0;
  81. border-top:1px solid #cccccc;
  82. margin:1em 0;
  83. padding:0;
  84. }
  85.  
  86. input, select {
  87. vertical-align:middle;
  88. }

URL: http://html5doctor.com/html-5-reset-stylesheet/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.