CSS Diagnostics - Highlight Deprecated HTML With CSS & More...


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

CSS Diagnostics allows web designers and developers to highlight invalid HTML using CSS selectors. Say goodbye to the font tag by highlighting it in a large obnoxious border. It also has the ability to highlight 404 pages, old CSS classes and old JavaScript function calls.


Copy this code and paste it in your HTML
  1. /* Empty Attributes */
  2. img[alt=""], area[alt=""], *[class=""], a[href=""], a[href="#"], *[id=""], *[title=""]
  3. { border: 5px dotted yellow !important; }
  4.  
  5. /* Proposed Deprecation Due To CSS */
  6. body[background], table[background], td[background], th[background],
  7. input[border], table[border]
  8. table[cellpadding],
  9. table[cellspacing],
  10. object[codebase],
  11. img[height], object[height], table[height],
  12. a[name], form[name], img[name], object[name],
  13. a[target], area[target],
  14. td[valign], th[valign],
  15. img[width], object[width], table[width]
  16. { border: 5px dotted orange !important; }
  17.  
  18. /* W3C HTML 4 Strict Deprecated Attributes - http://www.w3.org/TR/html401/index/attributes.html */
  19. applet[align], caption[align], div[align], h1[align], h2[align], h3[align], h4[align], h5[align], h6[align], hr[align], iframe[align], img[align], input[align], legend[align], object[align], p[align], table[align],
  20. body[alink],
  21. applet[alt],
  22. applet[archive],
  23. body[background],
  24. body[bgcolor], td[bgcolor], tr[bgcolor], table[bgcolor],
  25. img[border], object[border],
  26. br[clear],
  27. applet[code],
  28. applet[codebase],
  29. basefont[color], font[color],
  30. dir[compact], dl[compact], menu[compact], ol[compact], ul[compact],
  31. basefont[face], font[face],
  32. applet[height], td[height], th[height],
  33. applet[hspace], img[hspace], object[hspace],
  34. script[language],
  35. body[link],
  36. applet[name],
  37. hr[noshade],
  38. td[nowrap], th[nowrap],
  39. applet[object],
  40. isindex[prompt],
  41. hr[size], font[size], basefont[size],
  42. ol[start],
  43. body[text],
  44. li[type], ol[type], ul[type],
  45. html[version],
  46. body[vlink],
  47. li[value],
  48. applet[vspace], img[vspace], object[vspace],
  49. hr[width], td[width], th[width], applet[width], pre[width]
  50. { border: 5px dotted red !important; }
  51.  
  52. /* Non W3C Proprietary HTML Attributes - http://en.wikipedia.org/wiki/Non-standard_HTML_tags#Proprietary_HTML_attributes */
  53. body[bgproperties],
  54. *[bordercolor], *[bordercolordark], *[bordercolorlight],
  55. body[topmargin], body[rightmargin], body[bottommargin], body[leftmargin],
  56. table[frame]
  57. { border: 5px dotted magenta !important; }
  58.  
  59.  
  60.  
  61. /* Empty Elements */
  62. /*span:empty,*/ /*div:empty,*/ li:empty, /*p:empty,*/ td:empty, th:empty
  63. { border: 5px solid yellow !important; }
  64.  
  65. /* Proposed Deprecated Elements */
  66. input[type="button"], input[type="reset"], input[type="submit"], tt, big, small
  67. { border: 5px solid orange !important; }
  68.  
  69. /* W3C HTML 4 Strict Deprecated Elements - http://www.w3.org/TR/html401/index/elements.html */
  70. applet, basefont, center, dir, font, isindex, menu, s, strike, u,
  71. listing, plaintext, xmp
  72. { border: 5px solid red !important; }
  73.  
  74. /* Non W3C Proprietary HTML Elements - http://en.wikipedia.org/wiki/Non-standard_HTML_tags */
  75. audioscope, bgsound, blink, bq, comment, embed, fn, ilayer, /*image,*/ keygen, layer, limittext, marquee, multicol, nobr, noembed, nolayer, nosmartquotes, rt, ruby, server, sidebar, spacer, wbr, xml, blackface, shadow
  76. { border: 5px solid magenta !important }
  77.  
  78.  
  79.  
  80. /* XHTML 1.0 Strict Deprecated Attributes - http://www.w3.org/TR/xhtml1/#h-4.10 - http://www.w3.org/TR/xhtml11/changes.html#a_changes */
  81. a[name], applet[name], form[name], frame[name], iframe[name], img[name], map[name]
  82. { border: 5px dotted lime !important }
  83.  
  84. /* XHTML 1.0 Strict Prohibitions http://www.w3.org/TR/xhtml1/#prohibitions */
  85. a > a,
  86. pre > img, pre > object, pre > big, pre > small, pre > sub, pre > sup,
  87. button > input, button > select, button > textarea, button > label, button > button, button > form, button > fieldset, button > iframe, button > isindex,
  88. label > label,
  89. form > form
  90. { border: 5px solid lime !important }
  91.  
  92.  
  93.  
  94. /* Deprecated Classes From Old Website */
  95. .toolbg, .ulnone, span.b, ul.list, .eleven,
  96. .lines, .wide, .select, table.form, form td.b, table .top,
  97. .gallerypic, .iegallery, .pic, .image, .transparent,
  98. .wht, .blk, .blue, .dkgray, .ltgray, .brown, .quote, .greyhover
  99. { border: 5px groove red !important; }
  100.  
  101. /* Dreprecated JavaScript From Old Website */
  102. input[onfocus*="normal1px()"],
  103. input[onfocus*="change1px()"]
  104. { border: 5px dashed red !important; }
  105.  
  106. /* 404 Pages */
  107. a[href*="/designs/web/web1/"],
  108. a[href*="/designs/web/web2/"],
  109. a[href*="/designs/web/web3/"],
  110. a[href*="/designs/aitp/aitp-fvtc/"],
  111. a[href*="/designs/aitp/aitp/"],
  112. a[href*="/forms/contact.asp"],
  113. a[href*="/forms/email.asp"]
  114. { border: 5px double red !important; }

URL: http://www.nealgrosskopf.com/tech/thread.asp?pid=17

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.