My links will show up on my webpage but won't work when I click them

<head>
<ul>
	<center>
		<a href="ct_new.html">-Welcome- </a>
		<a href="ct_sched.html">-Schedule-</a>
	</center>
	</ul>
</head>

Hello, welcome to the forums!

Due to how the forums renders code, you’ll have to share it using this method: How do I format code in my posts?, in future, thanks! For now I’ll just paste it in to the top of my message here.

So there’s a couple issues that may be causing problems:

  • You should not have any of that HTML code inside of the <head> tag; the head is designed to store metadata and non-displayed code such as linking to CSS files/listing the page title, it should not contain any actually displayed content, as this should go into the <body> tag (not <head>)
  • The <center> tag has actually been removed from HTML as of the release of HTML5 and is unfortunately not valid anymore, you’ll have to remove it from the code :slight_smile: . Centering text now has to be done via CSS instead.
  • The <ul> element is designed to have <li> elements (representing individual entries on the list) as it’s direct children, like this:
    <ul>
       <li>List element 1</li>
       <li>List element 2</li>
       <li>List element 3</li>
    </ul>
    
    You aren’t currently using any <li> tags in your code but you’ll need to add them in the appropriate locations (around the <a> tags) to follow the intended format of the unordered list.

Aside from those points, your list tags themselves look to be perfectly valid, are the two HTML files being referenced in the same folder as the HTML file containing that code?

Happy coding!

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.