Finde Fehler in HTML und hebe sie hervor.
/* 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;}
Du kannst die diagnostischen Stile im obigen Inhalt mit einem Bookmarklet anwenden.
DiagCSS
Kann ich wissen, wozu dieses CSS dient?
„Veraltet“ :) Entschuldigung.
„Deprecated“ ist korrekter.
http://en.wikipedia.org/wiki/Deprecation
Ich verstehe nicht, wie das „name“-Attribut bald veraltet sein kann. Das ist es, was das Formular beim Absenden an die Action-Seite sendet. Es sei denn, es wird zu ID geändert, in welchem Fall das Formular diese Daten anstelle von „name“ senden müsste.
Bei mir auch. Ich war davon auch überrascht.
Kann das nicht verstehen... :(
Das obige CSS dient eigentlich nur zur Fehlersuche bei älteren Elementen und Eigenschaften! Und jetzt?
HAHAHAHHAHAHAHHA
Meine Seite ist grün und ich habe sie noch nie SOOO ROT gesehen!
Das kann nicht richtig sein LOL
*f-ck das Gesicht des Mannes hier*
a[target]? Das verstehe ich nicht. Die einzige Alternative, die mir einfällt, ist
document.getElementById(“URL”).target = “_blank”;
Warum würdest du target entfernen?
Danke, sehr geehrter Herr
Dieser Code ist beeindruckend, aber bitte nennen Sie die Ausgabe des Codes
Verwenden Sie das bereitgestellte CSS auf Ihrer Webseite NUR während des Entwicklungsprozesses.
Das CSS sollte Ihnen Informationen über veraltete/fehlerhafte/falsche HTML-Implementierungen geben.
Eine Information, dass **a[target]** nicht mehr veraltet ist.
Quelle: http://dev.w3.org/html5/markup/a.html
Das ist ziemlich genial! Eine Chance auf aktualisierte Regeln für 2016?