If you have a long post, then you can create links to different sections on the same page to improve the user experience. These are called local links.
If you add local links at the beginning or end, users can quickly jump to the section by just clicking on those links.
Below are the simple steps to create a link to a section of HTML page or your wordpress post. Im going to use id selector to create local links.
Target Setup [Section or a place on the HTML web page]
- Select the text or paragraph that you want to link to.
- Click on Text Tab (in classic Editor) or see below pic for Gutenberg editor to get HTML page
- Add <a id=”Give_some_id_name_here” /a> before or after the text where you want to create the link to
- Copy the id name(without ” “) that you have given in above step. For example, id1 in above screenshot.
- Click on Visual tab (in classic Editor) or “Edit Visually” in Gutenberg editor (see below)
Note: If id name is more than one word, then use underscore ‘_’ to separate them.
Local Link setup
- Select the text where you want the user to click and jump to the target.
- Click on the link button
- Enter #id_name. Here id_name is the name that you copied in 4th step in Target setup procedure.
- Click on Apply button
Preview the page, click on the local link and verify that it jumps to the target.
As explained above, you can create as many local links as you want.