Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Nov 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    validating, error? help please

    here is my error below. below the error is my html code. im not understanding the error description. please and thank you.

    fabian

    Code:
     Line 98, Column 133: document type does not allow element "a" here; missing one of "object", "span", "bdo", "applet", "iframe", "tt", "i", "b", "u", "s", "strike", "big", "small", "font", "em", "strong", "dfn", "code", "q", "samp", "kbd", "var", "cite", "abbr", "acronym", "sub", "sup", "label", "ins", "del" start-tag 
    …age('Image7','','aboutamsro.png',1)"><img src="aboutams.png" name="Image7" wi✉ 
    The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element. 
    
    One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>"). 
     Line 98, Column 357: document type does not allow element "a" here; missing one of "object", "span", "bdo", "applet", "iframe", "tt", "i", "b", "u", "s", "strike", "big", "small", "font", "em", "strong", "dfn", "code", "q", "samp", "kbd", "var", "cite", "abbr", "acronym", "sub", "sup", "label", "ins", "del" start-tag 
    …('Image8','','photographyro.png',1)"><img src="photography.png" name="Image8"✉ 
    
     Line 98, Column 583: document type does not allow element "a" here; missing one of "object", "span", "bdo", "applet", "iframe", "tt", "i", "b", "u", "s", "strike", "big", "small", "font", "em", "strong", "dfn", "code", "q", "samp", "kbd", "var", "cite", "abbr", "acronym", "sub", "sup", "label", "ins", "del" start-tag 
    …ge('Image9','','webdesignro.png',1)"><img src="webdesign.png" name="Image9" w✉ 
     
    
     Line 98, Column 802: document type does not allow element "a" here; missing one of "object", "span", "bdo", "applet", "iframe", "tt", "i", "b", "u", "s", "strike", "big", "small", "font", "em", "strong", "dfn", "code", "q", "samp", "kbd", "var", "cite", "abbr", "acronym", "sub", "sup", "label", "ins", "del" start-tag 
    …age('Image10','','contactro.png',1)"><img src="contact.png" name="Image10" wi✉





    Code:
    <div align="center">
     <a name="aboutams"> <a href="#aboutams" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image7','','aboutamsro.png',1)"><img src="aboutams.png" name="Image7" width="100" height="28" border="0" id="Image7" alt="aboutams" /></a><a href="#photography" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image8','','photographyro.png',1)"><img src="photography.png" name="Image8" width="100" height="28" border="0" id="Image8" alt="photography" /></a><a href="#webdesign" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image9','','webdesignro.png',1)"><img src="webdesign.png" name="Image9" width="100" height="28" border="0" id="Image9" alt="webdesign" /></a><a href="#contact" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image10','','contactro.png',1)"><img src="contact.png" name="Image10" width="100" height="28" border="0" id="Image10" alt="contact" /></a></a></div>

  • #2
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,955
    Thanks
    9
    Thanked 726 Times in 720 Posts
    You're nesting your <a> elements. Putting your code in a slightly more readable form:

    Code:
    <div align="center">
    <a name="aboutams">
    <a href="#aboutams" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image7','','aboutamsro.png',1)"><img src="aboutams.png" name="Image7" width="100" height="28" border="0" id="Image7" alt="aboutams" /></a>
    <a href="#photography" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image8','','photographyro.png',1)"><img src="photography.png" name="Image8" width="100" height="28" border="0" id="Image8" alt="photography" /></a>
    <a href="#webdesign" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image9','','webdesignro.png',1)"><img src="webdesign.png" name="Image9" width="100" height="28" border="0" id="Image9" alt="webdesign" /></a>
    <a href="#contact" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image10','','contactro.png',1)"><img src="contact.png" name="Image10" width="100" height="28" border="0" id="Image10" alt="contact" /></a>
    </a>
    </div>
    You've got four links, fine, but these are all wrapped within <a name="aboutams">. Get rid of the code in red.

  • #3
    New Coder
    Join Date
    Nov 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    sb65,

    thank you for the reply, there are wrapped in that because the first link "aboutams" supposed to be an anchor. doesnt seem to be working

  • #4
    New Coder
    Join Date
    Nov 2009
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by SB65 View Post
    You're nesting your <a> elements. Putting your code in a slightly more readable form:

    Code:
    <div align="center">
    <a name="aboutams">
    <a href="#aboutams" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image7','','aboutamsro.png',1)"><img src="aboutams.png" name="Image7" width="100" height="28" border="0" id="Image7" alt="aboutams" /></a>
    <a href="#photography" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image8','','photographyro.png',1)"><img src="photography.png" name="Image8" width="100" height="28" border="0" id="Image8" alt="photography" /></a>
    <a href="#webdesign" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image9','','webdesignro.png',1)"><img src="webdesign.png" name="Image9" width="100" height="28" border="0" id="Image9" alt="webdesign" /></a>
    <a href="#contact" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image10','','contactro.png',1)"><img src="contact.png" name="Image10" width="100" height="28" border="0" id="Image10" alt="contact" /></a>
    </a>
    </div>
    You've got four links, fine, but these are all wrapped within <a name="aboutams">. Get rid of the code in red.

    wait, got it! thanks


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •