Nesting confusion - please help

This is a discussion on "Nesting confusion - please help" within the Web Page Design section. This forum, and the thread "Nesting confusion - please help are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Dec 26th, 2006, 11:22
New Member
Join Date: Dec 2006
Location: Scotland
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Nesting confusion - please help

hello everyone


I was messing about with links in my website using CSS and hover techniques and created the perfect links for my site.

I opened up my page in FF and EI7 and they appeared exactly how i wanted them to. Then i wentover to w3.org to check my html. Saddly i was disapointed to see a long list of errors telling me that the header tag could not be nested in that position. I was wondering if this nesting is actually breaking any rules or if it matters the html is not valid because it displays fine anyway.

Code: Select all
<a class="list forum-a00" href="***whatever***"><h1>***Header***</h1>***other info***</a>
Thanks in advance, Breadstick
Reply With Quote

  #2 (permalink)  
Old Dec 27th, 2006, 12:02
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Nesting confusion - please help

It matters both that your site validates and that you use correct structural mark-up.

Not doing so will confuse both search engines and those using assistive technology.

Correct your code as per the validation response.
Reply With Quote
  #3 (permalink)  
Old Dec 27th, 2006, 14:31
New Member
Join Date: Dec 2006
Location: Scotland
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Nesting confusion - please help

Thanks i will try to fins a walkaround.
Reply With Quote
  #4 (permalink)  
Old Dec 27th, 2006, 14:50
Reputable Member
Join Date: Jul 2006
Location: Scotland
Age: 22
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to snow
Re: Nesting confusion - please help

Code: Select all
<a class="list forum-a00" href="***whatever***"><h1>***Header***</h1>***other info***</a>
As Ukgeoff said - validating is very important if you're serious about web design...

but just to let you know that you can't have 'h1' elements inside a link tag - rather, keep the structure somethinglike: <h1><a>Header</a></h1>

(H1 is a containing element, for containing other content - much like a 'div', and not like a 'span' as far as I can make out... so you can use a div or heading with a 'text-align:right', and that would align the content, but not if you used a non-containing-stuff-element... correct me if I'm wrong someone! (if you can understand what I just wrote ))
Reply With Quote
Reply

Tags
html, nesting

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Confusion between DOM element and javascript object coolxo JavaScript Forum 3 Oct 22nd, 2007 23:38
Yet more confusion dhall Starting Out 7 Aug 20th, 2007 23:25
contact form confusion Gogglez JavaScript Forum 1 Feb 26th, 2007 21:58
nesting in XML schema - help needed sh33p1985 Other Programming Languages 0 Jan 18th, 2006 19:53
Printing Margin confusion Kouche Web Page Design 2 Jun 1st, 2005 15:00


All times are GMT. The time now is 05:01.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43