HTML Inspector is a code quality tool to help you and your team write better markup. It's written in JavaScript and runs in the browser, so testing your HTML has never been easier. - Philip Walton
! Failed rule "validate-attributes". " The 'bgcolor' attribute is no longer valid on the element and should not be used. HTMLจॻߏΛఆٛɺCSS০ϨΠΞτ ͱ͍͏Γ͚Λߦ͍·͠ΐ͏ɻ
! Failed rule "unused-classes". " The class 'hoge' is used in the HTML but not found in any stylesheet. ఆٛ͞Ε͍ͯͳ͍CSSHTMLͰࢀর͠ͳ͍Α͏ʹ ͠·͠ΐ͏ɻCSSͷࢀরίετ͕ൃੜͯ͠͠·͍ ·͢ɻ
! Failed rule "unnecessary-elements". " Do not use or elements without any attributes. CSSͷ০ɺଐੑ࣋ͨͳ͍ ඞཁͳ͍ͣͰ͢ɻਂ͚Εਂ͍΄Ͳɺඳը࣌ ͷϦϑϩʔͷճ͕૿͑ɺCSSJSͷࢀরͷίε τ͕૿͑·͢ɻ
! var img = new Image(); img.src = ""; ! Empty image src can destroy your site http://www.nczonline.net/blog/2009/11/30/empty-image-src-can- destroy-your-site/
! Failed rule "inline-event-handlers". " An 'onclick' attribute was found in the HTML. Use external scripts for event binding instead. ΠϕϯτͷఆٛJSϑΝΠϧͰߦ͏Α͏ʹ͠· ͠ΐ͏ɻΠϯϥΠϯͷఆٛཧ͕ඇৗʹ͘͠ɺ ༧ظ͠ͳ͍ෆ۩߹ΛҾ͖ى͜͠·͢ɻ
! Failed rule "script-placement". " elements should appear right before the closing<br/></body> tag for optimal performance.<br/><script>λάಉظతʹ࣮ߦ͞ΕΔͨΊɺͦͷؒ<br/>ϖʔδͷඳը͕ࢭ·Γ·͢ɻ</body>ͷ্ʹஔ͘<br/>͜ͱͰͦΕΛۃྗආ͚Δࣄ͕Ͱ͖·͢ɻ<br/>
Values of 0 shouldn't have units specified. You don't need to specify units when a value is 0. (zero-units) 0px0%0Ͱ͋Δ͜ͱʹมΘΓ͋Γ·ͤΜɻ ୯ҐΛͬͯϑΝΠϧαΠζΛݮΒ͠·͠ΐ͏ɻ
Element (a.active) is overqualified, just use .active without element name. Don't use classes or IDs with elements (a.foo or a#foo). (overqualified-elements) a.activeෆཁʹৄࡉ͕૿͍ͯ͠ΔηϨΫλͰ ͢ɻ.activeͱ͠ɺλάʹґଘ͠ͳ͍Α͏ʹ͠· ͠ΐ͏ɻηϨΫλʹIDΛ༻͢ΔͷΊ·͠ΐ ͏ɻ
The properties padding-top, padding-bottom, padding-left, padding-right can be replaced by padding. Use shorthand properties where possible. (shorthand) γϣʔτϋϯυͰهड़͠ɺͳදݱආ͚·͠ΐ ͏ɻ
The object literal notation {} is preferrable. The array literal notation [] is preferrable. new Array()ʹΑΔྻͷॳظԽɺҾ͕Θ͔Γ ʹ͍͘Ͱ͢ɻํͱϦςϥϧΛͬͨ΄͏͕ ݁ͰΘ͔Γ͍͢Ͱ͢ɻ
var array1 = new Array("foo"); // ["foo"] ! var array2 = new Array("foo", "bar"); // ["foo", "bar"] ! var array3 = new Array(3); // [] and array3.length is 3 var array1 = ["foo"]; // ["foo"] ! var array2 = ["foo", "bar"]; // ["foo", "bar"] ! var array3 = [undefined, undefined, undefined]; // [] and array3.length is 3 ʮObjectͬͱΘ͔Γʹ͍͘ͷͰׂѪ…ɻʯ