Welcome to the Linux Foundation Forum!

<a> tag not clickable

danieltkach
danieltkach Posts: 3
edited February 25 in LFW211 Class Forum

I'm on (LFW212) unit 4, Serving Static Content with Fastify (3)

The html anchor tag is not clickable, as if it were not there.
When I inspect the page I get the simple code below, but the word "Hello" is not a link, and cannot be clicked. I have no idea what's going on, any ideas?
** Gosh, the html I paste here is being converted, so I don't think you'll actually be able to see the html code, and the word "Hello" is in fact clickable, but it's not clickable in the browser when it's being served by my fastify server on localhost:3000, and I tried 3 browsers...




body {
background: #333;
margin: 1.25rem
}

    a {
        color: yellow;
        font-size: 2rem;
        font-family: sans-serif
    }
</style>


Hello

Comments

  • krave
    krave Posts: 53

    You can try to paste the code into the textarea first. And with selection of the code, click the 6th button of the toolbar above the textarea where you type. And find the code item from the the dropdown list then click it.

    <html>
    <head>
      <style>
       body { background: #333; margin: 1.25rem }
       a { color: yellow; font-size: 2rem; font-family: sans-serif }
      </style>
    </head>
    <body>
      <a hr‌ef='/hello.html'>Hello</a>
    </body>
    </html> 
    

    When you element does not work as you expected, you can press ctrl + shift + i in chrome on windows to bring up the dev tools. Then click the elements panel to find out what is going on.

    And maybe you have post in the wrong section. This is for LFW211 not LFW212. :)

  • xdxmxc
    xdxmxc Posts: 61

    thanks @krave - @danieltkach did that help at all?

Categories

Upcoming Training