-1

long time lurker first time signup and poster.

quiet simple really

how do i reference from the navigation page/index.html#id to just page#id - so i dont want it to show index.html

ie. ww.page1.com/pasture#clover

i am currently using the codes below, and dont mind if i need to put in some other code. the pages will be in .php later on but for now in html.

I am using the below codes

<a href="pasture/#clover">Clover</a>

from the navigation on the first page/all pages

<h3 id="clover">Clover</h3> 

and this on the target page

j08691
  • 204,283
  • 31
  • 260
  • 272
glen2602
  • 1
  • 2

1 Answers1

0

What you want: Anchors (or Bookmarks)

Look here: https://www.w3schools.com/html/html_links.asp

So: Use <a href="#clover">Clover</a>

Also: If you call the site as www.abc.de/index.html#123, then it will stay as it is - and give you www.abc.de/index.html#clover.

If you call the site as www.abc.de/#123, then it will also stay as it is - and give you www.abc.de/#clover.

Edit: I misunderstood the OP. I may edit this post later. Sorry.

Mijago
  • 1,569
  • 15
  • 18