Arun Palanisamy
Arun Palanisamy

Reputation: 5459

Is it possible to refer a particular line while giving some webpage hyperlink?

I need to provide some reference link to the customer. That particular page contains around say 4000 lines. I want to provide a link in a such a way that when the customer clicks the link it should open with 1000th line. is there any possibility to do such a thing.

For example Here the Some documentation link. If i click that it will open the from top of the page. What should i do to make it open at 400th line?

Upvotes: 0

Views: 636

Answers (1)

Anasse Hassala
Anasse Hassala

Reputation: 34

You can do so if the line you are referring to or an html element close to that line has an id tag : all you have to do is append "#id" to the URL (without the quotes) where id is the value of the id attribute of the element you target.

For example, appending #idm139669656543024 to the URL you provided opens the page and focuses on the html element with the idm139669656543024 id.

To view whether the "line" you're looking for has an id element you can inspect the source of the page using your browser.

I don't know if there is an easier way to do it. But that's how I'd do it.

Upvotes: 1

Related Questions