Skip to main content
Known Participant
September 17, 2017
Answered

Dreamweaver 2017 named anchors

  • September 17, 2017
  • 2 replies
  • 2496 views

I know that "insert named anchor" has unfortunately been removed and you are supped to link to element IDs but that doesn't help if you want to link to a word that is in the middle of a long paragraph and not a stand alone title or header. It will end up linking to the paragraph or div tag that the word is in and which might not be near the word.  Are there any shortcuts for this or will I just need to write in code what used to be fast and easy. Perhaps I should try to make a snippet?

    This topic has been closed for replies.
    Correct answer Jon Fritz

    To wrap the "anchor" text you want, in a set of <span> tags with an id, in CC 2017.5...

    1. Highlight the text you want to jump to in Design View
    2. Right click the highlighted text

    3. Choose Wrap Tag... from the pop up menu
    4. Type span in the text box that appears

    5. Hit Enter twice

    6. In the Properties window, add a unique id in the Id field

    You will then be able to link to that id using # and the id in the link field.

    2 replies

    Jon Fritz
    Community Expert
    Jon FritzCommunity ExpertCorrect answer
    Community Expert
    September 18, 2017

    To wrap the "anchor" text you want, in a set of <span> tags with an id, in CC 2017.5...

    1. Highlight the text you want to jump to in Design View
    2. Right click the highlighted text

    3. Choose Wrap Tag... from the pop up menu
    4. Type span in the text box that appears

    5. Hit Enter twice

    6. In the Properties window, add a unique id in the Id field

    You will then be able to link to that id using # and the id in the link field.

    elhzAuthor
    Known Participant
    September 19, 2017

    Thanks, I knew I could wrap it with span tags but writing that out in code took as long as writing out name= in code. From the top menu I could only wrap with div tags although I thought I used to be able to wrap with span tags from there. This will be faster than writing with code on a page with many anchors.

    elhzAuthor
    Known Participant
    September 19, 2017

    What I don't understsand though is why the right-click only brings up "wrap tag" in design view and gives you a box you can type in the word span.  When I right-click the same highlighted word in code I don't get that option. From the favorites bar if I hit the div icon and wrap it will wrap a div but around but not a span and I see no box I can type span in.  How would one do this from the top menu?

    BenPleysier
    Community Expert
    Community Expert
    September 17, 2017

    Try

    <a href="#shortcuts">My Shortcuts</a>

    <p>I know that "insert named anchor" has unfortunately been removed and you are supped to link to element IDs but that doesn't help if you want to link to a word that is in the middle of a long paragraph and not a stand alone title or header. It will end up linking to the paragraph or div tag that the word is in and which might not be near the word.  Are there any <span id="shortcuts">shortcuts</span> for this or will I just need to write in code what used to be fast and easy. Perhaps I should try to make a snippet?</p>

    Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
    Nancy OShea
    Community Expert
    Community Expert
    September 18, 2017

    <span id="shortcut1">Shortcut1</span>

    <span id="shortcut2">Shortcut2</span>

    etc...

    I have no idea how these will line up on various displays.  That may vary depending on how much text occurs between shortcuts & the end user's viewport size.

    Nancy O'Shea— Product User & Community Expert