-3

My index page has an error that i dont understand, also one of my pages has gone from 10 errors to 41 and i have no idea why. This is due in for the 11th of August and i really have to pass could anyone help?

Here is the code i am using for my index page. It coming up with this error: end tag for "style" omitted, but OMITTAG NO was specified even though the head tag is clearly in the right place.

<!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">
<head>
<link rel="stylesheet" type="text/css" href="COUNTRIES.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Tunisia </title>
<style type = "text/css">
  #Tunisia {
    position:absolute;
    top:190px;
    left:53%;
</style>
</head>
<body>

<h1 class="large">Tunisia</h1>

<div id="nav1">
    <a href="Sightseeing.html">Things to See</a><br/><br/><br/>
    <a href="FamousPeople.html">Famous People</a><br/><br/><br/>
</div>

<br/>
<br/>
<p>Tunisia is the northernmost country in Africa and, at almost 165,000 square kilometres
 (64,000 sq mi) in area, the smallest country in the Maghreb region of North Africa.
 It is bordered by Algeria to the west, Libya to the southeast and the Mediterranean Sea
 to the north and east. As of 2013, its population is estimated at just under 10.8 million.
</p>

<br/><br/>
<p>To find out more information about the beautiful country of Tunisia Visit:<br/>
<a href= "http://www.cometotunisia.co.uk/">ComeToTunisia.com</a><br/></p>

<div id="tunisia">
<img src = "butterfly.jpg" alt="Albums"/>
</div>

</body>
</html>
misterManSam
  • 24,303
  • 11
  • 69
  • 89
  • Please enter specific details of the problems. CSS and JS errors are shown in the browser console. Server logs also might lead to the root cause of the problem directly rather than asking people to execute some random code and find it out themselves. You may want to provide those. Its not clear what you are asking here. Please read the FAQ on how to ask proper questions. – Alok Swain Aug 04 '14 at 08:17

1 Answers1

0
<style type = "text/css">
  #Tunisia {
    position:absolute;
    top:190px;
    left:53%;
</style>

you have forgotten to close the opening {. Here you go:

<style type = "text/css">
  #Tunisia {
    position:absolute;
    top:190px;
    left:53%;
  }
</style>

As a word of warning, be careful using capital letters in your element ID's as discussed in this answer: https://stackoverflow.com/a/79022/648350 . Most noteably this comment

"Note that class and id attributes are case-sensitive in XHTML, all other attributes are not."

Community
  • 1
  • 1
haxxxton
  • 6,422
  • 3
  • 27
  • 57
  • Thanks very much, quite new to web designing with html and i seem to forget details quite a lot. Also im not very good at asking questions on this but thanks anyway its now validated. However my stylesheet seems to only link to one of my pages do you have any thoughts at all as to why this could be? – user3905769 Aug 05 '14 at 13:13
  • If this answer was helpful to you, dont forget to mark it as the correct answer. You will need to make sure that on all subsequent pages that you include the link to your `countries.css` file in the `head` again. – haxxxton Aug 05 '14 at 23:20