<title> tag mandatory?

The Unit 2 Chapter 1 project rubric says that every page should have a tag. I understand that it’s a good idea, but are students told that somewhere? Where? I notice that the pages they work on in the lessons sometimes do have one and sometimes don’t.

I’m not sure that it is explicitly taught anywhere in the code.org curriculum so that’s a good catch there. Strictly speaking, it isn’t required for the page to render properly, however, it’s the title that appears in the browser tab, so it’s at the very least a best practice to always include it. As a classroom teacher, I would always include it, but it should probably have a mention somewhere in the student instruction as well. I’ll pass it along.

Mike

1 Like

No. The tag is not mandatory. If a page has a title tag it shows up on the browser header when you view the page. See image.


CSD-Adding Favicon to your website” that you see on the top of the browser tab is the result of adding the tag to the webpage

  <head>
    <link rel="stylesheet" href="mystyle.css">
    <title>CSD-Adding Favicon to your website</title>
    <link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
  </head>
2 Likes