• I have been looking all over, and cannot seem to find an answer to this question, which is, what exactly are anchor tags, and how would you use them?

Viewing 9 replies - 1 through 9 (of 9 total)
  • That’s just an HTML code.

    Here is an example.

    Who is sending me spam messages by e-mail?

    It’s likely to be sent by an unemployed criminal with no formal education who has hijacked other people’s computers.

    If you have any more questions, ask a guy named Google. He is very good at finding information that you are looking for on the internet.

    Tom Bluewater
    MacHouse
    mhvt.net

    Hmm… Actually, the second one doesn’t appear correctly in this blog. Enclose a name=”01″ id=”01″ with <>.

    “Anchor tags” are simply the glue that makes the web work. Any link that appears on a page is, in its HTML,

    <a href="the address">the text</a>

    I’ll let others comment on where the “anchor” term came from (or see reference below). I think most of us simply call them “links”.

    In my experience, the word “anchor” is used most often in the context of “named anchor.” Perhaps that’s what you’re asking?

    “Named anchors” (aka bookmarks) can be used when you want to link directly to several places on a long page.

    If the HTML on a page looks like

    </h1><a name=somename></a>Major Heading</h1>

    Then elsewhere on the page you can have a link (anchor) like
    <a href="#somename">some link text</a>
    and clicking the link will move the page so that “Major Heading” is at the top (as long as there’s a screenful of info below it on the page).

    You can also link directly to that Major Heading section from *another* page with

    <a href="the-page-address#somename">some link text</a>

    See also:
    https://www.w3.org/TR/html401/struct/links.html

    Thread Starter wteach

    (@wteach)

    Well, for instance, in several fckeditor programs, there is a button for “links” and there is also an anchor button, shaped like an anchor. When you click it, it asks to put in an anchor name. That is what I am having issues with. Have hunted around, nothing I can find that states what it actually does.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    The “anchor” you’re thinking about is more like this:

    <a name="somename"></a>

    This places a named anchor into your page. So that when somebody links directly to your page with #somename at the end of the URL, it goes directly to that spot in the middle of the page.

    Yes, using “anchor” for “named anchor/bookmark” is not unusual.

    Note that in the default WordPress installation, the HotKey labeled “anchor” (ALT + SHIFT + A on Windows) does insert a “link” (i.e <a href=...).

    Heres a SIMPLE ANSWER for all of us geeks:

    Edit your wp-includes\js\tinymce\tiny_mce_config.php file and add the word ‘anchor’ in the list on line 32.
    This gives your admin TINYMCE an Anchor tag BUTTON.

    Then: to create a link to your ANCHOR, click on the Hyperlink button and use the name you gave to your anchor!

    BUT > you’ll need the whole URL for that page. i.e. https://www.mysite.com/?page_id=1#myanchor

    The usual href=”#myanchor” does not work in 2.3.1

    .

    SouthernGuy – others… any good reason why one shouldn’t be able to type in the link as just #myanchor ? Very good to have it like that to be able to move things around a bit – changing permalinks etc.

    Same Question…
    I use TinyMce advacned plugin and I used Anchor on one of my post.

    It suppose to be something like :
    https://www.silkrt.com/v01/?p=189&preview=true#howgoogleworks

    But I saw the code in html which is <a href="#hotwgoogleworks">but it keep link to:
    https://www.silkrt.com/v01/wp-content/themes/silkrtV1/#howgoogleworks
    and caused “Fatal error: Call to undefined function get_header() in /mnt/gs02/herd02/21031/domains/silkrt.com/html/v01/wp-content/themes/silkrtV1/index.php on line 1″

    Can anybody tell me what’s wrong with my wordpress (2.3.3) or should I just don’t use anchor for internal links?

    Ah, SouthernGuy, you have made me most happy. That’s the answer I was looking for. Thanks for that! Worked like a charm for me, I’m using permalinks based on the post name, maybe that makes a difference and maybe it doesn’t… I recommend trying it instead of ?page=

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Anchor Tags’ is closed to new replies.