Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

ref to another page and achor

//____________________________IN HTML_______________________________________
<section>
    <a id="section1">
        CONTENT
    </a>
</section>

<a href="different-page.html#section1">Section One</a>

//____________________________IN REACT_______________________________________
//npm i react-router-hash-link in CONSOLE
import { HashLink as Link } from 'react-router-hash-link';

<Link to="home-page#section-three">Section three</Link>
 
PREVIOUS NEXT
Tagged: #ref #page #achor
ADD COMMENT
Topic
Name
9+2 =