Survey Form - Build a Survey Form

I can’t preview my work and all test cases fail:
I am working on my survey form project and I notice that I can’t preview my code even after saving it. Also all test cases fail even when I am certain I have done some of the cases.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
    <title>Survey Form</tile>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width initial-scale=1.0">
    <h1 id="title">freeCodeCamp Survey Form</h1>
    <p id="description">hank you for taking the time to help us improve the platform</p>
    <form id="survey-form">
/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge: Survey Form - Build a Survey Form

Link to the challenge:

Welcome to our community!

  • The closing <title> tag is not valid in your code
  • content="width=device-width initial-scale=1.0"> add a comma after the width=device-width
  • add the link element within the head element to link your html file to the styles.css file: <link rel="stylesheet" href="styles.css">

This is just an aside. You can ignore me and just follow what was said above.

That is an interesting way browsers handle the invalid closing title tag

I would have guessed it counts as tag omission but the browsers (Firefox/Chrome) create a well-formed title element and puts all the body content inside it. Which seems a bit odd.

Not sure what the spec says but on MDN it says the browser should “ignore the rest of the page.”

Tag omission Both opening and closing tags are required. Note that leaving off </title> should cause the browser to ignore the rest of the page.
1 Like

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