Skip to main content
Participant
June 18, 2013
Question

Dreamweaver CC Named Anchor Tag Missing?

  • June 18, 2013
  • 2 replies
  • 94150 views

Insert > Named Anchor

This command has been removed. Does it exist elswhere, or does one have to hand code the HTML in DWCC?

This topic has been closed for replies.

2 replies

Inspiring
December 11, 2013

Historically,  I’ve avoided using named anchors, and I think my reasons may extend to the updated "link to ID" method discussed on this thread. 

If I recall correctly, over 5 years ago I did some experiments and determined that positioning on "short"  target pages isn't satisfactory.  The linked-to anchor point may not --cannot?-- be positioned at the top of the page.  (Maybe this has been improved in recent years... if so, please post back with a few words of explanation.)  In such cases, there seems to be no way of directing the visitors attention to the exact target, which I saw as a strong reason to avoid this technique.

A recent reason to re-examine this:  I now need to provide a master glossary page for groups of pages. The referring text should lead directly to the relevant definition in all cases.     Visitors may choose to ignore links on technical terms, to follow links in specific cases, or to visit the glossary page to study multiple terms in parallel.

Fast forward: I found this thread.

- - -

As a greybeard, especially, I understand the point raised by some in this thread:  change IS difficult.  For me, forgetting the old method and now identifying the link target by ID is easy.  I didn't use the old method, and the new one seems logical and forward-looking. 

- - -

From now on, how might a DW user go about managing multiple  link targets in a page?

A basic: seeing the targets.   As I recall, in past versions of DW, one could make named anchors visible in Design View  as a colored shield.   Is this still possible?  Does it apply to the old method of indicating link targets, the new, or both?  I set up test instances of both in a page.  In DW CC, I went to Preferences --> Invisible Elements  and I checked ALL boxes.   Nope,  lots of invisibles now visible, but no corresponding shield for either type of target.  Am I missing something?   Is there another setting? 

If there’s no visibility of IDs in Design View, and DW CC doesn’t offer any other link-target management, some of us can use Code View.  I can see exploring what’s allowed in IDs  (in 4.01 Transitional —what I’m using now— and the future) and coming up with a personal naming standard I can use to make it easier to “see” IDs I intend  as link targets.    Better than nothing, but doesn’t seem particularly efficient.

Generally, this seems like extra trouble and applicable only to people who are  comfortable with Code View.  I get the idea that using named targets has not been strongly supported in the past, and seems on the edge of being deprecated now.     Is that correct?  

Are there a simple alternative methods for achieving the same result?  

TIA

Nancy OShea
Community Expert
Community Expert
December 11, 2013

You can keep using named anchors (manually) in HTML 4 docs.  But they are definitely deprecated in HTML 5 docs.

The linked-to anchor point may not --cannot?-- be positioned at the top of the page.  (Maybe this has been improved in recent years... if so, please post back with a few words of explanation.) 

Nothing has changed.  It all depends on the length of the page and the size of your end-user's screen.

Alternatives:

jQuery scripts.  This one uses jQuery Smooth Scrolling.

http://alt-web.com/TEMPLATES/FixedLayout.shtml

Or, use jQuery Fancybox with Ajax or inline content that appears inside a modal window.

http://fancyapps.com/fancybox/

Nancy O.

Nancy O'Shea— Product User & Community Expert
Inspiring
December 12, 2013

Nancy O: Thanks for the confirmation that nothing has changed.   Though I'm using HTML 4, I definitely want to be aware of what's coming. 

And thanks for the suggestions!  I'll check those out as long-term alternatives.   It looks like using either will take a bit of study, and an amount of modification yet TBD.   Simple?   I guess I'll find out. 

Nancy OShea
Community Expert
Community Expert
June 18, 2013

Named anchors are deprecated since HTML4.  It's much simpler to use Div IDs in your markup:

     <div id="foo">

          Some content here....

     </div>

Then link to the ID on the same page like this:

     <a href="#foo">Some Link</a>

Or to a different page like this:

    <a href="pagename.html#foo">Some Link</a>

Nancy O.

Nancy O'Shea— Product User & Community Expert
golf25radioman
Known Participant
July 22, 2013

Nancy O. wrote:

Named anchors are deprecated since HTML4.  It's much simpler to use Div IDs in your markup:

     <div id="foo">

          Some content here....

     </div>

Then link to the ID on the same page like this:

     <a href="#foo">Some Link</a>

Or to a different page like this:

    <a href="pagename.html#foo">Some Link</a>

Nancy O.

So this outdated Anchor command, replaced by the Div ID has no command in the menus?  One has to do code to make it?  I'll admit I don't do much HTML, understand a fair share - enough to get by.  But don't understand why Adobe would delete a menu command and not replace it with what is the current HTML.  I've read your code and it seems to be much more time consuming than a menu command - that seems backwards to me...

Tom

Jon Fritz
Community Expert
Community Expert
July 22, 2013

Nope, you just add an ID to an element from the Properties Inspector, then link to the id.

It's actually one less step than the old anchor button.