/ Published in: CSS
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.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* Depreciated Elements */ applet, basefont, center, dir, font, isindex, menu, s, strike, u { border: 5px dotted red !important; } /* Depreciated Attributes */ *[background], *[bgcolor], *[clear], *[color], *[compact], *[noshade], *[nowrap], *[size], *[start], *[bottommargin], *[leftmargin], *[rightmargin], *[topmargin], *[marginheight], *[marginwidth], *[alink], *[link], *[text], *[vlink], *[align], *[valign], *[hspace], *[vspace], *[height], *[width], ul[type], ol[type], li[type] { border: 5px solid red !important; } /* Empty Elements */ div:empty, span:empty, li:empty, p:empty, td:empty, th:empty { padding: 20px; border: 5px dotted orange !important; } /* Empty Attributes */ *[alt=""], *[title=""], *[class=""], *[id=""], a[href=""], a[href="#"] { border: 5px solid orange !important; } /* Proposed Depreciated Elements */ input[type="button"], big, tt { border: 5px dotted yellow !important; } /* Proposed Depreciated Attributes */ *[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