Jump to content

How can I anchor to a <h1 id="title1"> tag of external url?


eaglehopes
Go to solution Solved by requinix,

Recommended Posts

I want to link to a special tag, for instance the <h1 id="title1"> tag in external url. Can I do that, how ? I tried , no success:

<a href="...freecluster.eu/page=x.html#title1"> link</a>

Thanks. :)

 

Edited by eaglehopes
[Edited : it has a special name : "anchoring a tag", not "linking", so I changed the title.
Link to comment
Share on other sites

  • eaglehopes changed the title to How can I anchor to a <h1 id="title1"> tag of external url?

No. I am using index.php page to include other pages and external url tag is inside one of that pages. I can give an example :

 

url of the external page  : http://x.freecluster.eu/index.php?page=articles

tag in the external page : <h2 id="specialfirewall"> ....</h2> (title of one article)

I want to link from : http://x.freecluster.eu/index.php?page=blog&subblog=CP&fin=FIXBUGS&blogPage=2.php

 

I added a link there but I can only get the page not focused on the tag like href="#<id>".

Can I do what I want with html?

Edited by eaglehopes
I delete some part of my page to not seen as making an advertisement of my page....
Link to comment
Share on other sites

Sometimes I saw that some sites do such things,,, maybe I saw it wrong, because I could not remember any site name.

I think it is not feasible to do such thing. Maybe I must seperate pages and link to seperate page which will be the most easy solution for now ☺️

 

 

Link to comment
Share on other sites

3 hours ago, eaglehopes said:

could you post the ACTUAL url you tried in your markup. i copied the above into a browser's address bar, added #art15 on the end of it, and it went to that point on the web page. there is no  id="specialfirewall" on that page, which would explain why a link with #specialfirewall on the end of it only goes to the page and not to a specific location on that page.

  • Like 1
Link to comment
Share on other sites

  • Solution
3 hours ago, eaglehopes said:

No. I am using index.php page to include other pages and external url tag is inside one of that pages. I can give an example :

url of the external page  : http://x.freecluster.eu/index.php?page=articles

tag in the external page : <h2 id="specialfirewall"> ....</h2> (title of one article)

I don't see any H2s with ids on the page. You can't link to one of them until they are given ids.

Why do you not have a page dedicated to showing a single article? You should be linking to that, not to some anchor buried deep on a paginated page.

Link to comment
Share on other sites

14 hours ago, requinix said:

I don't see any H2s with ids on the page. You can't link to one of them until they are given ids.

Why do you not have a page dedicated to showing a single article? You should be linking to that, not to some anchor buried deep on a paginated page.

@mac_gyver and @requinix thanks, you could not see "specialfirewall" tag, because I removed it as requinix said that after my last post. In the post before this I noticed that what requinix "will say" is logical : why am I holding my left ear with my right hand? :) Thanks.

Link to comment
Share on other sites

19 hours ago, eaglehopes said:

Sometimes I saw that some sites do such things,,, maybe I saw it wrong, because I could not remember any site name.

I think it is not feasible to do such thing. Maybe I must seperate pages and link to seperate page which will be the most easy solution for now ☺️

 

 

I was completely WRONG! I checked it in another page and worked ! It is feasible and that works actually like all contributer's said : if there is a tag and its valid id at the end of the link after "#" ! My big sorry again !

Edited by eaglehopes
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.