9 Replies - 2054 Views - Last Post: 10 January 2013 - 07:14 AM

#1 ronanbrowne88  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 33
  • Joined: 21-November 12

Cant figure out these 3 Validation errors

Posted 09 January 2013 - 02:33 AM

Ok soo i was validating my code and ive got it down to just 3 errors but cant figure out what i need to do to fix these.
could anyone point me in the right direction?

here are errors it threw back at me

Line 20, Column 40: An a start tag seen but an element of the same type was already open.
<div class="slot"><a href ="index.html"><p>Home</p></a>

Line 20, Column 40: End tag a violates nesting rules.
<div class="slot"><a href ="index.html"><p>Home</p></a>

Line 20, Column 40: Cannot recover after last error. Any further errors will be ignored.
<div class="slot"><a href ="index.html"><p>Home</p></a>

Here is relevant code starting at line 18

 

<div id = "header">
<h1 style = "margin-bottom:0;color:orange" > Toys for Boys aged 3 years+ </h1><a id="top">
<div class="slot"><a href ="index.html"><p>Home</p></a>
</div>
<div class="slot"><a href ="Toddelers.html"><p>Toddelers</p></a>
</div>
<div class="slot"><a href ="boysToys.html"> <p>Boys Toys</p></a>
</div>
<div class="slot"><a href ="girlsToys.html"><p>Girls Toys</p></a>
</div>
<div class="slot"><a href ="teens.html"><p>Teenagers</p></a>
</div>
<div class="slot"><a href ="outdoor.html"><p>Outdoor Toys</p> </a>
</div>
<div class="slot"><a href ="computerGames.html"><p>Computer games</p></a>
</div> 
</div>



Is This A Good Question/Topic? 0
  • +

Replies To: Cant figure out these 3 Validation errors

#2 raghav.naganathan  Icon User is offline

  • Perfectly Squared ;)
  • member icon

Reputation: 408
  • View blog
  • Posts: 1,440
  • Joined: 14-September 12

Re: Cant figure out these 3 Validation errors

Posted 09 January 2013 - 02:39 AM

Well, remove the <p> tags and their closing </p> tags and they should work fine...:)

regards
Raghav
Was This Post Helpful? 0
  • +
  • -

#3 ronanbrowne88  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 33
  • Joined: 21-November 12

Re: Cant figure out these 3 Validation errors

Posted 09 January 2013 - 02:44 AM

Thanks for advive but i tryed that but it didn't work , i got the exact same errors even if i took out the <p></p> tags
Was This Post Helpful? 0
  • +
  • -

#4 raghav.naganathan  Icon User is offline

  • Perfectly Squared ;)
  • member icon

Reputation: 408
  • View blog
  • Posts: 1,440
  • Joined: 14-September 12

Re: Cant figure out these 3 Validation errors

Posted 09 January 2013 - 02:45 AM

Well, can you show me the resolved code that you have after removing the <p> tags?

regards,
Raghav
Was This Post Helpful? 0
  • +
  • -

#5 ronanbrowne88  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 33
  • Joined: 21-November 12

Re: Cant figure out these 3 Validation errors

Posted 09 January 2013 - 02:47 AM

also on the validator it had the ending > in <a href ="index.html"> highlighted red if that gives any insight

heres resolved code

<div id = "header">
<h1 style = "margin-bottom:0;color:orange" > Toys for Boys aged 3 years+ </h1><a id="top">
<div class="slot"><a href ="index.html">Home</a>
</div>
<div class="slot"><a href ="Toddelers.html">Toddelers</a>
</div>
<div class="slot"><a href ="boysToys.html"> Boys Toys</a>
</div>
<div class="slot"><a href ="girlsToys.html">Girls Toys</a>
</div>
<div class="slot"><a href ="teens.html">Teenagers</a>
</div>
<div class="slot"><a href ="outdoor.html">Outdoor Toys </a>
</div>
<div class="slot"><a href ="computerGames.html">Computer games</a>
</div> 
</div>
 

Was This Post Helpful? 0
  • +
  • -

#6 raghav.naganathan  Icon User is offline

  • Perfectly Squared ;)
  • member icon

Reputation: 408
  • View blog
  • Posts: 1,440
  • Joined: 14-September 12

Re: Cant figure out these 3 Validation errors

Posted 09 January 2013 - 02:47 AM

Yes, I also forgot...remove the following part from your code...

<a id="top">


regards,
Raghav
Was This Post Helpful? 0
  • +
  • -

#7 ronanbrowne88  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 33
  • Joined: 21-November 12

Re: Cant figure out these 3 Validation errors

Posted 09 January 2013 - 04:14 AM

Thank you that was it, one last question on errors if i may !

i have this one

Line 151, Column 4: td start tag in table body.
<td><a id="pic5"></a><p>

relivent code, i presume its something with the anchor i have there?

 <tr>
<th colspan = "2"> heading </th>
</tr>

<td><a id="pic5"></a><p> 
text here
</p>
</td>

Was This Post Helpful? 0
  • +
  • -

#8 raghav.naganathan  Icon User is offline

  • Perfectly Squared ;)
  • member icon

Reputation: 408
  • View blog
  • Posts: 1,440
  • Joined: 14-September 12

Re: Cant figure out these 3 Validation errors

Posted 09 January 2013 - 04:17 AM

Well, always a <td> tag should be enclosed in a <tr> and </tr> tags.

take your </tr> from line 3 and place it after line 8 in the above code.

Edit: Better still, let that line 3 </tr> remain where it is...you can add another <tr> tag on line 4 and a closing </tr> after line 8.

regards,
Raghav

This post has been edited by raghav.naganathan: 09 January 2013 - 04:43 AM

Was This Post Helpful? 1
  • +
  • -

#9 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3541
  • View blog
  • Posts: 10,227
  • Joined: 08-June 10

Re: Cant figure out these 3 Validation errors

Posted 09 January 2013 - 05:11 AM

View Postronanbrowne88, on 09 January 2013 - 10:33 AM, said:

Line 20, Column 40: End tag a violates nesting rules.
<div class="slot"><a href ="index.html"><p>Home</p></a>

Explanation: block elements* (<p>, <div>, etc.) must not be placed inside inline elements (<a>, <span>, etc.). hence the nesting error.


* - elements that cause the next element to be placed on a new line and cover the complete available width.
Was This Post Helpful? 2
  • +
  • -

#10 Nublet  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 53
  • Joined: 12-October 12

Re: Cant figure out these 3 Validation errors

Posted 10 January 2013 - 07:14 AM

It appears that you already have your answers but I just wanted to point out that it's "toddlers" and not "toddelers". No offense meant btw :P
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1