문제

I'm getting some weird errors when I run my site through the W3C validation tool for HTML 4.01 Transitional.

The errors are:

Line 9, Column 9: required attribute "TYPE" not specified
Line 34, Column 7: required attribute "TYPE" not specified
Line 1183, Column 10: end tag for "UL" which is not finished

I'm guessing the first is due to not specifying type="text/css" in the <style> tag on line 24 (I'm not sure why it says line 9 above) - is that correct?

But the other two have me stumped:

As far as I can tell, I've closed all my </UL> tags and applied type="..." everywhere else to <script> and <style>.

I've also had a look at those line numbers and can't see where the error is.

Thanks in advance.

도움이 되었습니까?

해결책

For the first two errors, you should have <style type="text/css"> instead of just <style>:

<STYLE type="text/css"><!--
  .qa-body-js-on .qa-notice {display:none;}
//--></STYLE>

and

<style type="text/css">
  #qa-share-buttons-container {
    background: none repeat scroll 0 0 #DDDDDD;
    font-size: 125%;
    font-weight: bold;
    margin: 20px 0;
    padding: 20px;
    text-align: center;
  }
  ..                
</style>

For the last error, as stated by the validation output:

Another possibility is that you used an element which requires a child element that you did not include. Hence the parent element is "not finished", not complete.

In this case, your <ul> node starting at line 1182 is just:

<UL CLASS="qa-nav-footer-list">
</UL>

You will need to add some children to the unordered list.

다른 팁

Your ul has no list items within it:

<UL CLASS="qa-nav-footer-list">
</UL>

so should be:

<ul CLASS="qa-nav-footer-list">
    <li>Some list items</li>
    <li>Some list items</li>
</ul>

and both style tags are missing type="text/css" (lines 9 and 34)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top