• guys,

    I’m no expert in HTML but I’ve written many websites. If I remember correctly, an HTML element with this code:

    a name=”anchor”

    should NOT appear on the page as an actual hyperlink, but rather just plain text. Isn’t that right? In my attached image, I am modifying the HTML code via the menu option “view as HTML” and I’m only entering that same code, but when switching back to “view as visual”, the stupid thing appears as a hyperlink!

    where am I going wrong here?

    https://drive.google.com/open?id=1JWh3gyuHQcVZDwCK3a-TC6JXl4IJ_0Wy

    • This topic was modified 5 years, 3 months ago by ajetrumpet.
    • This topic was modified 5 years, 3 months ago by ajetrumpet.
    • This topic was modified 5 years, 3 months ago by ajetrumpet.
    • This topic was modified 5 years, 3 months ago by ajetrumpet.
Viewing 9 replies - 1 through 9 (of 9 total)
  • The name tag is not supported in HTML 5. You can use the id tag.

    The following code will appear as ‘Top of page!’

    <h2 id="top">Top of page!</h2>

    Then in order to go to that anchor, just use:

    <a href="#top">Go to top</a>

    Hope this clarifies.

    Thread Starter ajetrumpet

    (@ajetrumpet)

    more than likely it will. I will switch my method. thanks my friend!

    Thread Starter ajetrumpet

    (@ajetrumpet)

    websprout,

    I’m using ID on a ‘p’ tag, but it’s not giving me the desired result. w3schools.com tells me that ID is indeed part of the ‘p’ tag. what am i missing? see image….

    https://drive.google.com/open?id=1wlkeZqYpL5zqizbV9HduvtwCuyR0q7XG

    You mean it is still showing the red and underline text? You need to remove the ‘link’ (click the chain icon in the editor to unlink it) so that it will show as normal text.

    Thread Starter ajetrumpet

    (@ajetrumpet)

    i don’t think you follow what i’m saying sprout. when you have an anchor on a page, text that sends to the user TO that anchor’s location HAS to be in the form of a hyperlink. doesn’t it? that would cause it to be underlined. if yes then the image in my last post is right, and wordpress needs to be fixed.

    surelyI must be doing something wrong, as wordpress can’t possibly be wrong…?

    • This reply was modified 5 years, 3 months ago by ajetrumpet.
    • This reply was modified 5 years, 3 months ago by ajetrumpet.

    Is it possible for you to share with me the URL of the page so I can take a look to help?

    Thread Starter ajetrumpet

    (@ajetrumpet)

    sure thing my friend. here you go:

    https://wordpress.neuroproiowa.com/web_applications/php/

    you’ll notice that there are 3 hyperlinks at the top, all of which should take you to the 3 anchors that are below them, but they don’t. don’t bother clicking on the rest of the links in the page. I’ve deleted all the database content except what’s relevant on that page.

    • This reply was modified 5 years, 3 months ago by ajetrumpet.

    Hi,
    There’s something wrong with the HTML codes on that page, if you look at the codes, it is:

    <li><a href="https://<a href=&quot;#capturing_form_data&quot;>Capturing / Submitting Form Data</a>">Capturing / Submitting Form Data</a></li>
    

    You have a ‘a href’ nested inside another ‘a href’. The correct code should be:

    
    <li><a href="#capturing_form_data">Capturing / Submitting Form Data</a></li>
    

    I have created a testing page where you can see how it works at –
    https://singaporewordpress.com/testing1/test-php

    I believe it is the way you use the editor that creates this issue. I suggest you simply use the ‘text’ editor to input the HTML directly to keep it clean and not the visual editor.

    Hope this helps.

    Thread Starter ajetrumpet

    (@ajetrumpet)

    thanks my friend. and actually, I DO use the text editor to create that stuff. I select “view as HTML” when I’m in the line of text that’s supposed to be the ‘a’ tag and then write the HTML code in that way. however, the code seems to change and duplicate the “href=” statement whenever I hit the “update” button. I think wordpress kind of sucks in this regard. either that, or possibly the pages on which this is happening are pages that have become corrupt due to me “updating” and re-publishing them multiple times? is that possible? I noticed by looking at the mysql data that everytime I “update” a page, wordpress’s PHP code inserts a record into the “wp_posts” table. I think that’s a terrible idea, although great for auditing purposes.

    • This reply was modified 5 years, 3 months ago by ajetrumpet.
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘‘a’ tag displaying as an actual hyperlink’ is closed to new replies.