Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-16-2012, 09:33 PM   PM User | #1
TYJesus
New Coder

 
Join Date: Jan 2012
Location: Walla Walla
Posts: 10
Thanks: 2
Thanked 0 Times in 0 Posts
TYJesus is an unknown quantity at this point
li not allowed as child element in markup validation

I appreciate all help to get this to validate in MarkUp. My goal is mainly to learn how to write good code.

It is a simple <a>, anchor, in a <li>, list, and I read in google where some say it is okay to have, but I would prefer to have this page fully validate.

It may be worth mentioning how there is a js error right before this. It doesn't like the obsolete name tag. I was going to address that after this, but I am mentioning it to make sure it is not the cause of the invalidation of the below list anchor code.

Here is the error:
Element li not allowed as child of element div in this context. (Suppressing further errors from this subtree.)

http://thefamilyhunters.atwebpages.com/classyShow.html

section of code:
Code:
	<div id="Second">
		<div id="TwoOne">
				Your content here 
				<li><a href="../indexHunting.html">Your Links</a></li>
				<li><a href="*">Your Links</a></li>
				<li><a href="../indexHunting.html">Your Links</a></li>
		</div>
		<div id="TwoTwo">
				Looks Good
				<li><a href="../indexHunting.html">More Links</a></li>
				<li><a href="../indexHunting.html">More Links</a></li>
				<li><a href="../indexHunting.html">More Links</a></li>
		</div>
		<div id="TwoThree">
				Thank You Lord Jesus
				<li><a href="../indexHunting.html">More Links</a></li>
				<li><a href="../indexHunting.html">More Links</a></li>
				<li><a href="../indexHunting.html">More Links</a></li>
		</div>
		<div id="TwoFour">
				One More
				<li><a href="../indexHunting.html">More Links</a></li>
				<li><a href="../indexHunting.html">More Links</a></li>
				<li><a href="../indexHunting.html">More Links</a></li>
		</div>
	</div>
I can add the full css sheet, if you would like. I didn't believe it was necessary because I should be able to validate the markup without the css. Correct me right, if I thought wrong.
TYJesus is offline   Reply With Quote
Old 01-16-2012, 09:35 PM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello again TYJesus,
See html lists here.

Your li's should be wrapped in ul or ol tags.
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 01-16-2012, 09:36 PM   PM User | #3
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Read the rest of the error message the validator is giving you. It goes on to explain that.
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 01-16-2012, 09:42 PM   PM User | #4
TYJesus
New Coder

 
Join Date: Jan 2012
Location: Walla Walla
Posts: 10
Thanks: 2
Thanked 0 Times in 0 Posts
TYJesus is an unknown quantity at this point
O, wow. It is like learning the ABC's.

Validated nicely.

Thank You, again, for your patience and good work Excavator.

Yes, I am learning to validate during development. I am figuring out how often. Like, every element, or particular section, or line, or maybe it depends on how good the coder is, this is what I am discovering.

Last edited by TYJesus; 01-16-2012 at 09:46 PM..
TYJesus is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 03:12 PM.


Advertisement
Log in to turn off these ads.