How to create a self closing link element?

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**
<!DOCTYPE html>
<html>
<head>
  <title>Registration Form</title>
  <a  href="styles.css" rel="stylesheet"></a>
</head>
<body>
</body>
</html>
  **Your browser information:**

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36

Challenge: Step 4

Link to the challenge:

…?


This is not a link element

How do I make a link element?"

Same way you made any other element. You need an opening link tag. A link element is self-closing, so you don’t need a closing link tag. Inside of that opening tag, you need to put href and rel attributes with the appropriate values.

A strange extra thing for this step is that they want your tag to end in /> instead of the usual >. We’re working to relax that test since both work.

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