School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,117 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,003 people online right now. Registration is fast and FREE... Join Now!




Validation

 

Validation, What do I need to fix on this html code for it to pass validation!

d741582

29 Oct, 2009 - 03:08 PM
Post #1

New D.I.C Head
*

Joined: 13 Oct, 2009
Posts: 6


My Contributions
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/xhtml; charset=UTF-8" />
<title>Geek Junkie</title>
<style type="text/css">

<!--
body{background-color: black; background-image: url('images/bg.gif')}
a {color: yellow}
.link {font-family:Arial; font-size:10pt; color: yellow}
:hover {background-color: orange}
!-->
</style>
</head>
</body>

<body>

<span style="font-family:Arial; font-size: 8pt; color: lightblue">
<h2>Welcome to GeekJunkie, your online geek source.</h2>



</span>
<span style="font-family:Arial; font-size: 10pt; color: white">

<body>

<p>What do we have to offer?</p>
</span>
<span style="font-famiy:Arial; font-size: 10pt; color: orange">
<ul>
<li>Gaming</li>
<li>Software</li>
<li>Music</li>
<li>Video</li>
<li>News</li>
<li>updates</li>
<li>Tutorials</li>
<li>Source code</li>
<li>And much more</li>
</ul>
</span>
<span style="font-family:Arial; font-size: 10pt; color: white">

<p>We are launching our online forum (a great way to nework with others) this summer! Make sure you register to get all of GeekJuice's up-dates and news.</p>
</span>
</body>

<span class="link">
<p>
<center>
<a href="about.htm">about us</a>
<a href="news.htm">news</a>
<a href="things.htm">news</a>
<a href="contact.htm">contact</a>
<a href="guests.htm">guests</a>
</center>
</p>
</span>
<p>
<a href="http://jigsaw.w3.org/css-validator/check/referer">
<img style="border:0;width:88px;height:31px"
src="http://jigsaw.w3.org/css-validator/images/vcss"
alt="Valid CSS!" />
</a>
</p>

</body>
</html>

User is offlineProfile CardPM
+Quote Post


iphoneorange

RE: Validation

29 Oct, 2009 - 04:03 PM
Post #2

D.I.C Head
Group Icon

Joined: 20 Aug, 2008
Posts: 145



Thanked: 17 times
Dream Kudos: 75
My Contributions
If you really wanna help us, please code.gif

Here is your source, except this is valid:
CODE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-type" content="text/xhtml; charset=UTF-8" />
<title>Geek Junkie</title>
<style type="text/css">

<!--
body{background-color: black; background-image: url('images/bg.gif')}
a {color: yellow}
.link {font-family:Arial; font-size:10pt; color: yellow}
:hover {background-color: orange}
h2{font-family:Arial; font-size: 8pt; color: lightblue}
!-->
</style>
</head>


<body>

<h2>Welcome to GeekJunkie, your online geek source.</h2>

<span style="font-family:Arial; font-size: 10pt; color: white">


What do we have to offer?
</span>
<div style="font-famiy:Arial; font-size: 10pt; color: orange">
<ul>
<li>Gaming</li>
<li>Software</li>
<li>Music</li>
<li>Video</li>
<li>News</li>
<li>updates</li>
<li>Tutorials</li>
<li>Source code</li>
<li>And much more</li>
</ul>
</div>
<span style="font-family:Arial; font-size: 10pt; color: white">

We are launching our online forum (a great way to nework with others) this summer! Make sure you register to get all of GeekJuice's up-dates and news.
</span>


<div class="link">
<center>
<a href="about.htm">about us</a>
<a href="news.htm">news</a>
<a href="things.htm">news</a>
<a href="contact.htm">contact</a>
<a href="guests.htm">guests</a>
</center>

</div>
<p />
<a href="http://jigsaw.w3.org/css-validator/check/referer">
<img style="border:0;width:88px;height:31px"
src="http://jigsaw.w3.org/css-validator/images/vcss"
alt="Valid CSS!" />
</a>
<p/>

</body>
</html>


It only had a few errors, 1. you put things in <span>s that shouldn't go in <span>s. (E.G. h2, p, ul) 2. you are using stuff like style="css here", when you should be making classes/id in the <style> tags. 3. you had multiple <body> tags

also, you used <p></p>. I hardly ever see tha these days, so I would suggest <p />

Hope i helped biggrin.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 01:29PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month