How to make a "Home" Bay and others render the main page of my html document?

Asked

Viewed 129 times

-1

Greetings! I created an html-css navigation bay with the following features:

<ul class "nav">
  <li><a href="# n a"> Home </a></li>
  <li><a href="# n b"> Contacto </a></li>
</ul>

but my problem is that I cannot get the user to access the Main Page by clicking on the Home Stall. What’s left for the "Home" stall to render the main page? Please help. Thank you all.

  • A good start would be to remove the spaces within the href, and hit class syntax (does not interfere with navigation, but lacks a = between the class and the "nav". This is assuming that your navigation is by JS, or a single page application. If it is multiple pages, you have to href="nomedapagina.extensao", clear-cut.

  • Thank you. But I’m still doubtful. I wouldn’t be more practical with an example?

  • 1

    It would be yes, can [Dit] the question and put your current code (and mention the name of the archives and how are organized your pages) as an example, would help us post some precise answer.

  • Thank you to all who tried to help me. I have already found the answer to my question and I recognize that it was poorly formulated. Thankful.

  • Ismael, you completely changed the question in the last issue, and so I reversed it. If you have a new question, please post a new question separately mind using the button you have at the top of the site. Thank you.

1 answer

1

Hello, your syntax is incorrect. Below is the right code.

<ul class="nav"> // faltou o '=' entre class e "nav";
  <li><a href="enderecodahome"> Home </a></li> //Haviam espaços no href.
  <li><a href="enderecodacontato"> Contacto </a></li> //Haviam espaços no href.
</ul>

Below is an example of a horizontal jsfiddle menu.

https://jsfiddle.net/KyleMit/hGF54/

If you want, you will find a lot of HTML5 and CSS3 content in various books and video lessons on youtube, I recommend this book: https://www.casadocodigo.com.br/products/livro-html-css

And these video lessons: https://www.youtube.com/watch?v=epDCjksKMok

Browser other questions tagged

You are not signed in. Login or sign up in order to post.