Skip to main content
Participant
Mar 11, 2020 2:59 PM UTC
Question

Anchor ID in a document

I am trying to establish an anchor ID so I can link an html link to that anchor.  I can't find the properties box to set the anchor within DW CC 2020. Thanks!

This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

Participant
Mar 11, 2020 3:13 PM UTC

I found this answer below.  I still cannot find the properties diaglogue box, perhaps it has been removed in this version?

 

Named anchors were removed from HTML5 a long time ago.  Simply give your section or container a unique ID and reference it in your link code. 

 

<section id="uniqueID">

CONTENT GOES HERE

</section>

 

<a href="#uniqueID">Link to unique ID on same page</a>

<a href="page_name.html#uniqueID">Link to unique ID on another page</a>

Translate
Jon Fritz
Community Expert
Community Expert
Mar 11, 2020 3:26 PM UTC

Go to Window > Properties or hit Ctrl + F3 to open the Properties Window

Once open, make sure the HTML button on the left of the window is active.

Select your element and add a unique id (it can only appear as the id one time in a given page) in the ID Field

Select the text/element you want to use as a link and add #theid into the Link field of the Property Window.

Translate
Jon Fritz
Community Expert
Community Expert
Mar 11, 2020 3:11 PM UTC

Anchors fell out of use when they stopped being supported in the HTML Standard.

To link to specific areas of your page, give an element in that area a unique HTML ID from within the Properties panel, then link to it using #theidname as the link path.

<div id="maincontent">your content here </div>

 

<a href="#maincontent">Your link here</a>

 

 

Translate