Nu HTML Checker

So I don’t know what I’m supposed to do here. Someone please help.

  1. Warning : Consider adding a lang attribute to the html start tag to declare the language of this document.From line 2, column 19; to line 3, column 23 TYPE html>↩<div class="container">↩ ↩ For further guidance, consult Declaring the overall language of a page and Choosing language tags.If the HTML checker has misidentified the language of this document, please file an issue report or send e-mail to report the problem.
  2. Error : Element head is missing a required instance of child element title .From line 2, column 19; to line 3, column 23 TYPE html>↩<div class="container">↩ ↩

Content model for element head :

If the document is an iframe srcdoc document or if title information is available from a higher-level protocol: Zero or more elements of metadata content, of which no more than one is a title element and no more than one is a base element.

Otherwise: One or more elements of metadata content, of which exactly one is a title element and no more than one is a base element.https://codepen.io/shaniakond/pen/wvzzMpN?editors=1000

considering that codepen already have those elements in the background you can ignore those errors, but only because you are coding on codepen
for the same reason you should also remove the DOCTYPE tag and the html tag (you have a closing tag at the bottom but not an opening one but I may be missing it

1 Like

I knew I shouldn’t have added the DOCTYPE. Thank you so much :slight_smile:

Just so you know for real projects, this is how you do it.

<!--  This is how you add language to your html tag  -->
<html lang="en">
</html>

<!-- This is how you add title inside your head -->
<head>
<title>This is my title</title>
</head>
1 Like

AWESOME! Thanks man.

the skeleton is something like

<!DOCTYPE html>
<html>
   <head>
      <!-- here title and metadata -->
   </head>
   <body>
      <style>
         <!-- your css -->
      </style>
      <!-- your html elements -->
      <script>
         // your javascript
      </script>
   </body>
</html>

there are variations, including external files, multiple scripts etc, but that is more or less the basics

1 Like

@ShaniaKond, when I posted about you using the W3C validator I also noted;

  • Since copy/paste from codepen you can ignore the first warning and first two errors.
1 Like

I might’ve been too overwhelmed to have had it registered completely when I read through your suggestion.

Thank you for clarifying it!