CSS Diagnostics - Find Depreciated Elements Using CSS


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

Find depreciated elements and attributes using CSS . Simply add the CSS below to the end of your style sheet and it will highlight bad code.


Copy this code and paste it in your HTML
  1. /* Depreciated Elements */
  2. applet, basefont, center, dir, font, isindex, menu, s, strike, u { border: 5px dotted red !important; }
  3.  
  4. /* Depreciated Attributes */
  5. *[background], *[bgcolor], *[clear], *[color], *[compact], *[noshade], *[nowrap], *[size], *[start],
  6. *[bottommargin], *[leftmargin], *[rightmargin], *[topmargin], *[marginheight], *[marginwidth], *[alink], *[link], *[text], *[vlink],
  7. *[align], *[valign],
  8. *[hspace], *[vspace],
  9. *[height], *[width],
  10. ul[type], ol[type], li[type]
  11. { border: 5px solid red !important; }
  12.  
  13.  
  14. /* Empty Elements */
  15. div:empty, span:empty, li:empty, p:empty, td:empty, th:empty { padding: 20px; border: 5px dotted orange !important; }
  16.  
  17. /* Empty Attributes */
  18. *[alt=""], *[title=""], *[class=""], *[id=""], a[href=""], a[href="#"] { border: 5px solid orange !important; }
  19.  
  20.  
  21. /* Proposed Depreciated Elements */
  22. input[type="button"], big, tt { border: 5px dotted yellow !important; }
  23.  
  24. /* Proposed Depreciated Attributes */
  25. *[border], a[target], table[cellpadding], table[cellspacing], a[name], form[name] { border: 5px solid yellow !important; }

URL: http://www.nealgrosskopf.com/tech/thread.asp?PID=3

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.