需要协助处理样式表中的问题和其他问题

时间:2014-08-04 08:14:35

标签: javascript html css

我的索引页面有一个我不明白的错误,我的一个页面已经从10个错误变为41个,我不知道为什么。这是在8月11日到期,我真的必须通过可以有人帮忙吗?

这是我用于索引页面的代码。它出现了这个错误:" style"的结束标记。省略,但即使头标记显然在正确的位置,也指定了OMITTAG NO。

<!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>

1 个答案:

答案 0 :(得分:0)

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

您忘记关闭开幕式{。你走了:

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

作为警告,请注意在您的元素ID中使用大写字母,如本答案中所述:https://stackoverflow.com/a/79022/648350。最值得注意的是这条评论

  

&#34;请注意,class和id属性在XHTML中都是区分大小写的   其他属性不是。&#34;