Back to Freecodecamp

Step 3

curriculum/challenges/english/blocks/learn-basic-css-by-building-a-cafe-menu/5f331e55dfab7a896e53c3a1.md

latest1.0 KB
Original Source

--description--

The title is one of several elements that provide extra information not visible on the web page, but it is useful for search engines or how the page gets displayed.

Inside the head element, nest a meta element with an attribute named charset set to the value utf-8 to tell the browser how to encode characters for the page.

Remember that meta elements are void elements that require no ending tag.

--hints--

You should have a meta tag.

js
assert.match(code, /<meta.*?\/?>/is);

The meta element is a void element, it should not have an end tag </meta>.

js
assert.notMatch(code, /<\/meta>/i);

Your meta tag should have a charset attribute.

js
assert.match(code, /<meta\s+charset\s*/i);

Your charset attribute should have a value of utf-8.

js
assert.match(code, /charset\s*=\s*('|")utf-8\1/i);

--seed--

--seed-contents--

html
<!DOCTYPE html>
<html lang="en">
--fcc-editable-region--
  <head>
    <title>Cafe Menu</title>
  </head>
--fcc-editable-region--
</html>