Submit problem in HTML CSS

Tell us what’s happening:
I am giving meta tag but not getting pass.

  **Your code so far**
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Colored Markers</title>
  </head>
<body>
</body>
</html>
  **Your browser information:**

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:101.0) Gecko/20100101 Firefox/101.0

Challenge: Step 4

Link to the challenge:

This tag is left unclosed. This is a self-closing tag, close it and you’ll pass the challenge.
Always remember to close every tags even if they aren’t self-closing.

Also tried that. Not working.


  <head>
    <meta charset="utf-8"/>
    <title>Colored Markers</title>
  </head>
1 Like

Hello,
Welcome to the Forums :wave:


Your code passes for me try your code in a different browser or in an incognito window.

When working with a self-closing tag, you failed to close the tag. I said “close the tag” but you didn’t do that.
This is an example of an element with an opening and closing tag:

<title></title>

You can see there’s a “/“ backslash in the closing tag.

To close a self-closing tag all you need is include that backslash in the tag without including a closing tag for example:

<tag attribute=“value” />

Now this :arrow_up: is a self-closing tag.

The backslash isn’t always needed for a self-closing tag.


Edit: I also edited the post of @srpallab it looks like he did use a backslash.

In my browser I tried his solution without a backslash and it failed and when I added the backslash it passed so I figured it was a requirement to pass the challenge. I guess there’s a bug somewhere.

The code does pass for me, not sure whether its a prob with my browser now.
Backslash might work for the current problem(maybe), a backslash isn’t always required for self-closing tags, there might be a problem with the tests or the browser.

Yeah this might be the case.

@srpallab try this approach or if you have adBlockers extensions in your browser I strongly advice you disable the adBlockers for freeCodeCamp as they often interfere with the tests.

Hopefully you’ve been able to pass the challenge.

Happy Coding :+1:!

there is no rocket science in this you just need to close self tag which is making this issue hope you will understand
you can close this tag simple by backslash. i was also facing same issue then i recheck all and got that i didn’t close 2 tags.

capitalize your “UTF-8”

and use a forward slash/ to close the self closing tag

<meta charset="UTF-8" />