Find mistakes in HTML and highlight the crap out of them.
/* Empty Elements */
div:empty, span:empty, li:empty, p:empty, td:empty, th:empty
{ padding: 20px; border: 5px dotted yellow !important; }
/* Empty Attributes */
*[alt=""], *[title=""], *[class=""], *[id=""], a[href=""], a[href="#"]
{ border: 5px solid yellow !important; }
/* Deprecated Elements */
applet, basefont, center, dir, font, isindex, menu, s, strike, u
{ border: 5px dotted red !important; }
/* Deprecated 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; }
/* Proposed Deprecated Elements */
input[type="button"], big, tt
{ border: 5px dotted #33FF00 !important; }
/* Proposed Deprecated Attributes */
*[border], a[target], table[cellpadding], table[cellspacing], *[name]
{ border: 5px solid #33FF00 !important; }
div:empty, span:empty,
li:empty, p:empty,
td:empty, th:empty {padding: 0.5em; background: yellow;}
*[style], font, center {outline: 5px solid red;}
*[class=""], *[id=""] {outline: 5px dotted red;}
img[alt=""] {border: 3px dotted red;}
img:not([alt]) {border: 5px solid red;}
img[title=""] {outline: 3px dotted fuchsia;}
img:not([title]) {outline: 5px solid fuchsia;}
table:not([summary]) {outline: 5px solid red;}
table[summary=""] {outline: 3px dotted red;}
th {border: 2px solid red;}
th[scope="col"], th[scope="row"] {border: none;}
a[href]:not([title]) {border: 5px solid red;}
a[title=""] {outline: 3px dotted red;}
a[href="#"] {background: lime;}
a[href=""] {background: fuchsia;}
You can apply the diagnostic styles in the above content with a bookmarklet:
DiagCSS
can i know what is the use of this css?
“Depreciated” :) sorry.
“Deprecated” is more correct.
http://en.wikipedia.org/wiki/Deprecation
I don’t understand how the “name” attribute can be deprecated anytime soon. That’s what the form sends to the action page upon submit. Unless it’s changed to ID, in which case the form would have to send that data instead of “name”.
same here. I was surprised by that too.
Cant understand… this.. :(
The CSS above is actually only to debug elements and proprites olders! And now?
HAHAHAHHAHAHAHHA
my site is green and i have never seen it SOOO RED!
this can’t by right LOL
*f-ck that guy face here*
a[target]? I don’t get it. The only alternative I can think of is
document.getElementById(“URL”).target = “_blank”;
Why would you remove target?
thanks dear sir
this code is imaging but sir please mention the output of the code
Using provided CSS on your web page ONLY during development process.
The CSS should provide you with information on depricated/broken/wrong HTML implementations.
A heads up that a[target] is no longer deprecated.
Source: http://dev.w3.org/html5/markup/a.html
This is pretty awesome! Any chance on an updated set of rules for 2016?