Alfredo D
Alfredo D

Reputation: 7

Navigation links not linking

I know this is so simple but I am learning HTML and CSS on my own. In the navigation section, it usually links Home, About, Contact, etc tabs, and most of them contains ul; li, a href tags, to have underline links and takes you to the section/tab being linked. Don't know what I'm missing or doing something wrong. Here's the html code here.

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

Upvotes: 0

Views: 155

Answers (4)

geosciz
geosciz

Reputation: 321

Change

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

to

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

Upvotes: 0

notentered
notentered

Reputation: 145

a tag has to be used independently, so it should be like following:

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

Upvotes: 0

Maximillian Laumeister
Maximillian Laumeister

Reputation: 20378

You are missing some brackets in this piece of code:

<li a href="index.html">Home</a></li>

Here is the corrected version:

<li><a href="index.html">Home</a></li>

You will need to change this for all of your li elements, so the final version will be:

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

Upvotes: 0

Wim Mertens
Wim Mertens

Reputation: 1790

Change to

<li><a href="index.html">Home</a></li>

Upvotes: 0

Related Questions