Does link tag have to go after title in head?

You must select a tag to post in this category. Please find the tag relating to the section of the course you are on E.g. Forms, Structure

When you ask a question, don’t forget to include a link to the exercise or project you’re dealing with!

If you want to have the best chances of getting a useful answer quickly, make sure you follow our guidelines about how to ask a good question. That way you’ll be helping everyone – helping people to answer your question and helping others who are stuck to find the question and answer! :slight_smile:

Hey @byte2501269670!
Can you please expand on your question a little bit?

If all the question is what you have on the topic place, then no it does not. The link element only has to go inside of the head tags. It should work regardless of whether you place it before or after the title tags.

For the sake of robots, the closer to the top the TITLE appears, the better. This is SEO 101. The logical placement is right after the charset declaration.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Best Place for a Page Title Element</title>
  <link rel="stylesheet" href="styles.css">
</head>
<body>
  <h1>About TITLE Element Placement</h1>
</body>
</html>
1 Like

Huh. But it doesn’t have to be, right? I always place it right after the title and its more logical, but syntax wise, it doesn’t make a difference.

The purpose of declaring the encoding first is so that International characters are recognized in the TITLE.