html help - midnight deadline!

Aoami

I am a FH squatter
Joined
Dec 22, 2003
Messages
11,223
Hey guys, i come to you for help once again! This time for a uni project. I'm tasked with making a website about my favourite things using the xhtml 1.0 DTD. I didn't know what xhtml 1.0 was last night until JingleBells told me on IRC and had done it all in html. It works, (it's not finished, need to put in some breaks to line it all up properly) but does not pass the w3c validation, which is a requirement to pass.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" >


<head>

<style type="text/css">
a{text-underline: none;}

a:hover{color: red;}
a:active{color: blue;}
a:visited{colour: purple;}
</style>

<title>My favorite Computer Games</title>

<meta http-equiv="Content-Type"
   content="text/html; charset=ISO-8859-1"/>

</head>

<body>

<h1>My top 10 Computer Games</h1>

<p>More difficult decisions...</p>

<ol>
<li><a href="http://en.wikipedia.org/wiki/Theme_hospital"> Theme Hospital</a> <p><img src="https://forums.freddyshouse.com/images/themehosp.gif" align="left" hspace="25" alt="Theme Hospital"/></p></li>

<p>text</p>

<li><a href="http://en.wikipedia.org/wiki/Sonic_and_knuckles"> Sonic and Knuckles</a> <p><img src="https://forums.freddyshouse.com/images/sonknuckles.gif" align="left" hspace="25"/></p></li>

<p>text</p>

<li><a href="http://en.wikipedia.org/wiki/The_Legend_of_Mir_2"> Legend of Mir II</a> <p><img src="https://forums.freddyshouse.com/images/mir2.jpg" align="left" hspace="25"/></p></li>

<p>Legend of Mir was the first Massively Multiplayer Online Roleplaying Game (MMORPG) I ever played. You played as one of three characters; A Taoist (The Healer), A Warrior (The Fighter) or a Wizard (The... well, Wizard). The aim of the game was to group with other players and
raid dungeons for items to make your characters stronger. It also had a unique Player vs. Player (PvP) system at the time. There were special sanctioned areas where PvP was authorised, and the aim was the take the Town of Sabuk Wall. PvP could also be participated in anywhere in the world
but you were penalised. It was this dynamic system that kept the game entertaining and kept me coming back.</p>

<li><a href="http://en.wikipedia.org/wiki/Super_Street_Fighter_II#Super_Street_Fighter_II_Turbo"> Super Street Fighter II Turbo</a> <p><img src="https://forums.freddyshouse.com/images/ssf2t.jpg" align="left" hspace="25"/></p></li>

<p>The king of beat-em-up games for me. I loved every character in this game, and they were quite advanced for their time. From Guile's Sonic Boom to Dhalsim's stretchy arms, every character had something original
about them which gave the game a longeviety rarely acheived in the fighting genre.</p>

<li><a href="http://en.wikipedia.org/wiki/Mega_Bomberman"> Mega Bomberman</a> <p><img src="https://forums.freddyshouse.com/images/bomberman.jpg" align="left" hspace="25"/></p></li>

<p>Mega Bomberman was my favourite game as a child. It was so simple, yet so absorbing and most importantly so much fun to play with friends. The aim of the game is to drop bombs on a map, pick up power-up's and
kill the people you're playing with. As I said, simple, but very effective!</p>

<li><a href="http://en.wikipedia.org/wiki/Football_Manager"> Football Manager</a> <p><img src="https://forums.freddyshouse.com/images/fm05.jpg" align="left" hspace="25"/></p></li>

<p>The Football Manager series is a hugely in depth Football Management Simulator. You take control of any professional team in the world and aim to take them to glory. The fact it is so in depth is what keeps football geeks like myself coming back as there is always new players to discover,
different ways to develop players, and different formations and tactics to make up to beat that team in the Champion's League Final. With Basingstoke. After 15 years.</p>

<li><a href="http://en.wikipedia.org/wiki/Pro_Evolution_Soccer_5"> Pro Evolution Soccer 5</a> <p><img src="https://forums.freddyshouse.com/images/pro.jpg" align="left" hspace="25"/></p></li>

<p>Pro Evolution Soccer 5 was the best football simulation game that was ever made and ever will be made - enough said.</p>

<li><a href="http://en.wikipedia.org/wiki/Civilization_(computer_game)"> Civilization</a> <p><img src="https://forums.freddyshouse.com/images/civi.jpg" align="left" hspace="25"/></p></li>

<p>Civilization is a game that has taken many many hours from many many people and probably ruined a few marriages and parent-child relationships along the way. It's is a thoroughly addictive turn based strategy game in which your main aim is to take over the world. You start the game
in 5,000 BC and you go through the ages doscovering new technologies, building cities, constructing wonders, pulling together an army, and using said Army to do your bidding in far off battlefields. What made this game so addictive was the depth and unpredictability of it. You never knew
how far along your opposition Countrys were, what kind of Army and Technology they had, and when they were going to attack. Also, you had control of every little aspect of the game, meaning there was always something to keep an eye on and stop the boredem setting in.</p>

<li><a href="http://en.wikipedia.org/wiki/The_curse_of_monkey_island"> The Curse of Monkey Island</a> <p><img src="https://forums.freddyshouse.com/images/curseofmonkeyisland.jpg" align="left" hspace="25"/></p></li>

<p>The Curse of Monkey Island is the third in the Monkey Island series, and my favourite. It is a wonderful game in which you guide the main character, Guybrush Threepwood through a series of challenges, culminating in the destruction (for the third time) of Captain Le Chuck. What
sets The Curse of Monkey Island apart from other adventure and puzzle games is the humour. It is a brillianty scripted game with make all of the puzzles in the game all that more entertaining and reqarding when you complete them.</p>

<li><a href="http://en.wikipedia.org/wiki/Dark_age_of_camelot"> Dark Age of Camelot</a> <p><img src="https://forums.freddyshouse.com/images/daoc.jpg" align="left" hspace="25"/></p></li>

<p>I wasted roughly four years of my life playing Dark Age of Camelot (DAoC for short)... but i enjoyed every minute of it. Like "Legend of Mir", DAoC is MMORPG, which means if you want to suceed, countless hours must be put into the game. DAoC is based on three warring factions:
<ul>
<li>Albion (England)</li>
<li>Hibernia (Ireland)</li>
<li>Midgard (Scandinavia)</li>
</ul>
The aim of the game is to take a character to war. You play for one faction and fight with the rest of the players in the faction for control of the Frontiers. Control is gained by taking keeps and relics, which become player controlled. The reason I enjoyed this game so much was
the depth. The world was massive, there were a lot of different character types to try out (around 30) and because the you were playing with and against real people, the events of each day would be completely different. Argubably the most important thing about a good online game
however is the community. DAoC had the best community of any game I have ever played, and I am still in contact with many of fellow players today.
</p>
</ol>

<p align="middle"><a href="home.html">Return to the homepage</a> <a href="cd's.html">My favourite CD's</a> <a href="books.html">My favourite Books</a> <a href="films.html">My favourite Films</a> <a href="tv.html">My favourite TV Shows</a></p>
</body>

</html>

Here are some of the errors i'm getting:

  • The first line of the body, about Theme Hospital - It's telling me align and hspace are invalid ("There is no attribute align/hspace"), but it isn't saying that for any other list items
  • IT doesn't allow <li> start tags before the hyperlinks, assuming missing <ol> or <ul> start tags.
  • Also for the last line where it says <align="middle"> before the links to other pages, it's saying there is no attribute 'align'

Any suggestions?

edit - Oh, and thanks in advance :D
 

Aoami

I am a FH squatter
Joined
Dec 22, 2003
Messages
11,223
One error left now that i can't get rid of

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" >


<head>

<style type="text/css">
a{text-underline: none;}

a:hover{color: red;}
a:active{color: blue;}
a:visited{colour: purple;}

</style>

<title>My favorite Computer Games</title>

<meta http-equiv="Content-Type"
   content="text/html; charset=ISO-8859-1"/>

</head>

<body>

<h1>My top 10 Computer Games</h1>

<p>More difficult decisions...</p>

<ol>
<li><a href="http://en.wikipedia.org/wiki/Theme_hospital"> Theme Hospital</a> <p><img src="images/themehosp.gif" alt="Theme Hospital" style="float : left; margin-right : 25px;"/></p>

<p>text</p>

<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/></li>

<li><a href="http://en.wikipedia.org/wiki/Sonic_and_knuckles"> Sonic and Knuckles</a> <p><img src="images/sonknuckles.gif" alt="Sonic and Knuckles" style="float : left; margin-right : 25px;"/></p>

<p>text</p></li>

<li><a href="http://en.wikipedia.org/wiki/The_Legend_of_Mir_2"> Legend of Mir II</a> <p><img src="images/mir2.jpg" alt="Legend of Mir II" style="float : left; margin-right : 25px;"/></p>

<p>Legend of Mir was the first Massively Multiplayer Online Roleplaying Game (MMORPG) I ever played. You played as one of three characters; A Taoist (The Healer), A Warrior (The Fighter) or a Wizard (The... well, Wizard). The aim of the game was to group with other players and
raid dungeons for items to make your characters stronger. It also had a unique Player vs. Player (PvP) system at the time. There were special sanctioned areas where PvP was authorised, and the aim was the take the Town of Sabuk Wall. PvP could also be participated in anywhere in the world
but you were penalised. It was this dynamic system that kept the game entertaining and kept me coming back.</p></li>

<li><a href="http://en.wikipedia.org/wiki/Super_Street_Fighter_II#Super_Street_Fighter_II_Turbo"> Super Street Fighter II Turbo</a> <p><img src="images/ssf2t.jpg" alt="Super Street Fighter II Turbo" style="float : left; margin-right : 25px;"/></p>

<p>The king of beat-em-up games for me. I loved every character in this game, and they were quite advanced for their time. From Guile's Sonic Boom to Dhalsim's stretchy arms, every character had something original
about them which gave the game a longeviety rarely acheived in the fighting genre.</p></li>

<li><a href="http://en.wikipedia.org/wiki/Mega_Bomberman"> Mega Bomberman</a> <p><img src="images/bomberman.jpg" alt="Mega bomberman" style="float : left; margin-right : 25px;"/></p>

<p>Mega Bomberman was my favourite game as a child. It was so simple, yet so absorbing and most importantly so much fun to play with friends. The aim of the game is to drop bombs on a map, pick up power-up's and
kill the people you're playing with. As I said, simple, but very effective!</p></li>

<li><a href="http://en.wikipedia.org/wiki/Football_Manager"> Football Manager</a> <p><img src="images/fm05.jpg" alt="Football Manager" style="float : left; margin-right : 25px;"/></p>

<p>The Football Manager series is a hugely in depth Football Management Simulator. You take control of any professional team in the world and aim to take them to glory. The fact it is so in depth is what keeps football geeks like myself coming back as there is always new players to discover,
different ways to develop players, and different formations and tactics to make up to beat that team in the Champion's League Final. With Basingstoke. After 15 years.</p></li>

<li><a href="http://en.wikipedia.org/wiki/Pro_Evolution_Soccer_5"> Pro Evolution Soccer 5</a> <p><img src="images/pro.jpg" alt="Pro Evolution Soccer" style="float : left; margin-right : 25px;"/></p>

<p>Pro Evolution Soccer 5 was the best football simulation game that was ever made and ever will be made - enough said.</p></li>

<li><a href="http://en.wikipedia.org/wiki/Civilization_(computer_game)"> Civilization</a> <p><img src="images/civi.jpg" alt="Civilization" style="float : left; margin-right : 25px;"/></p>

<p>Civilization is a game that has taken many many hours from many many people and probably ruined a few marriages and parent-child relationships along the way. It's is a thoroughly addictive turn based strategy game in which your main aim is to take over the world. You start the game
in 5,000 BC and you go through the ages doscovering new technologies, building cities, constructing wonders, pulling together an army, and using said Army to do your bidding in far off battlefields. What made this game so addictive was the depth and unpredictability of it. You never knew
how far along your opposition Countrys were, what kind of Army and Technology they had, and when they were going to attack. Also, you had control of every little aspect of the game, meaning there was always something to keep an eye on and stop the boredem setting in.</p></li>

<li><a href="http://en.wikipedia.org/wiki/The_curse_of_monkey_island"> The Curse of Monkey Island</a> <p><img src="images/curseofmonkeyisland.jpg" alt="The Curse of Monkey Island" style="float : left; margin-right : 25px;"/></p>

<p>The Curse of Monkey Island is the third in the Monkey Island series, and my favourite. It is a wonderful game in which you guide the main character, Guybrush Threepwood through a series of challenges, culminating in the destruction (for the third time) of Captain Le Chuck. What
sets The Curse of Monkey Island apart from other adventure and puzzle games is the humour. It is a brillianty scripted game with make all of the puzzles in the game all that more entertaining and reqarding when you complete them.</p></li>

<li><a href="http://en.wikipedia.org/wiki/Dark_age_of_camelot"> Dark Age of Camelot</a> <p><img src="images/daoc.jpg" alt="Dark Age of Camelot" style="float : left; margin-right : 25px;"/></p>

<p>I wasted roughly four years of my life playing Dark Age of Camelot (DAoC for short)... but i enjoyed every minute of it. Like "Legend of Mir", DAoC is MMORPG, which means if you want to suceed, countless hours must be put into the game. DAoC is based on three warring factions:
<ul>
<li>Albion (England)</li>
<li>Hibernia (Ireland)</li>
<li>Midgard (Scandinavia)</li>
</ul>
<br/>
The aim of the game is to take a character to war. You play for one faction and fight with the rest of the players in the faction for control of the Frontiers. Control is gained by taking keeps and relics, which become player controlled. The reason I enjoyed this game so much was
the depth. The world was massive, there were a lot of different character types to try out (around 30) and because the you were playing with and against real people, the events of each day would be completely different. Argubably the most important thing about a good online game
however is the community. DAoC had the best community of any game I have ever played, and I am still in contact with many of fellow players today.
</p></li>
</ol>
<p><a href="home.html">Return to the homepage</a> <a href="cd's.html">My favourite CD's</a> <a href="books.html">My favourite Books</a> <a href="films.html">My favourite Films</a> <a href="tv.html">My favourite TV Shows</a></p>
</body>

</html>

Error Line 79, Column 3: document type does not allow element "ul" here; missing one of "object", "ins", "del", "map", "button" start-tag.

<ul>


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>").
 

SheepCow

Bringer of Code
Joined
Dec 22, 2003
Messages
1,365
<ul> elements are not allowed inside a <p>. You must close the preceeding <p>, e.g.

Code:
<p>I wasted roughly four years of my life playing Dark Age of Camelot (DAoC for short)... but i enjoyed every minute of it. Like "Legend of Mir", DAoC is MMORPG, which means if you want to suceed, countless hours must be put into the game. DAoC is based on three warring factions:</p>
<ul>
<li>Albion (England)</li>
<li>Hibernia (Ireland)</li>
<li>Midgard (Scandinavia)</li>
</ul>
<p>The aim of the game is to take a character to war. You play for one faction and fight with the rest of the players in the faction for control of the Frontiers. Control is gained by taking keeps and relics, which become player controlled. The reason I enjoyed this game so much was the depth. The world was massive, there were a lot of different character types to try out (around 30) and because the you were playing with and against real people, the events of each day would be completely different. Argubably the most important thing about a good online game however is the community. DAoC had the best community of any game I have ever played, and I am still in contact with many of fellow players today.</p>

edit: The reason for this is the <p> element only allows inline elements below it, <ul> is a block-level element.

It'd be a good idea for you to read http://www.w3schools.com/xhtml/xhtml_intro.asp
 

Aoami

I am a FH squatter
Joined
Dec 22, 2003
Messages
11,223
Thanks SheepCow, forgot i made this thread. Managed to fix it myself and realised what a stupid error it was very early!
 

phlash

Fledgling Freddie
Joined
Dec 24, 2003
Messages
195
I know this is a bit late for your assignment but was there a reason you had to do this by hand instead of using an XHTML editor (eg: http://www.w3.org/Amaya/ ) which would avoid all the silly syntax errors? Just a thought...
 

ST^

Can't get enough of FH
Joined
Dec 22, 2003
Messages
2,351
Coding by hand is the only way to create clean code.
 

ST^

Can't get enough of FH
Joined
Dec 22, 2003
Messages
2,351
How does that not count as hand coding?
 

Users who are viewing this thread

Top Bottom