How to link to a <div> on another page?

81 0 0 0

Last Updated : 2021-02-27 00:04:55

How to link to a <div> on another page?

Create an anchor:


<a name="anchor" id="anchor"></a> 

then link to it:


<a href="http://server/page.html#anchor">Link text</a>

you can link it to url in laravel as


<a href="{{ url('/#div_id') }}" class="nav-link">  // take url after public and change to div id

Mahmoud Anwar

Mahmoud Anwar

Back End Developer with a passion for developing innovative web applications that expedite the efficiency and effectiveness of organizational success. Well-versed in technology and writing code to create systems that are reliable and user-friendly. Also has the proven ability to motivate, educate, and collaborate effectively to build web applications and effectively track changes. Confident communicator, strategic thinker, and innovative creator to develop software that is customized to meet a company’s organizational needs, highlight their core competencies, and further their success.