我知道这很简单,但我自己学习HTML和CSS。在导航部分,它通常链接Home,About,Contact等标签,其中大部分都包含ul; li,一个href标签,有下划线链接,并带你到链接的部分/标签。不知道我错过了什么或做错了什么。这是这里的html代码。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Home Cleaning Services in the SF Bay Area</title>
<!-- Custom styles for this template -->
<link href="css/style.css" rel="stylesheet">
</head>
<body>
<header>
<img src="Images/SparklingCleanLogo.jpg" class=ImageLogo>
<!--This is the menu bar-->
<nav>
<ul>
<li a href="index.html">Home</a></li>
<li a href="About.html">About US</a></li>
<li a href="Services.html">Services</a></li>
<li a href="Rates.html">Rates</a></li>
<li a href="contact.html">Contact US</a></li>
</ul>
</nav>
</header>
<h2>We Talk Cleaning</h2>
<p>Sparkling Cleaning is a dedicated family business in the home cleaning business. We have experience in different types of cleaning needs for all home sizes and offices. We work hard to provide you with a spotless place for your place.</p>
<img src="Images/Clean-house.jpg">
</body>
<footer>All Rights Reserved 2016</footer>
</html>
答案 0 :(得分:0)
更改为
<li><a href="index.html">Home</a></li>
答案 1 :(得分:0)
您在这段代码中缺少一些括号:
<li a href="index.html">Home</a></li>
以下是更正后的版本:
<li><a href="index.html">Home</a></li>
您需要为所有li
元素更改此内容,因此最终版本将为:
<li><a href="index.html">Home</a></li>
<li><a href="About.html">About US</a></li>
<li><a href="Services.html">Services</a></li>
<li><a href="Rates.html">Rates</a></li>
<li><a href="contact.html">Contact US</a></li>
答案 2 :(得分:0)
标签必须独立使用,所以它应该如下:
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="About.html">About US</a></li>
<li><a href="Services.html">Services</a></li>
<li><a href="Rates.html">Rates</a></li>
<li><a href="contact.html">Contact US</a></li>
</ul>
</nav>
答案 3 :(得分:0)
更改
<li a href="index.html">Home</a></li>
<li a href="About.html">About US</a></li>
<li a href="Services.html">Services</a></li>
<li a href="Rates.html">Rates</a></li>
<li a href="contact.html">Contact US</a></li>
到
<li><a href="index.html">Home</a></li>
<li><a href="About.html">About US</a></li>
<li><a href="Services.html">Services</a></li>
<li><a href="Rates.html">Rates</a></li>
<li><a href="contact.html">Contact US</a></li>