Build a Survey Form

image

Hello i’m having trouble figuring out why lines 50-52 (label and fieldset elements) won’t appear in the preview but everything before and after it works. I’m absolutely baffled and any help would be appreciated.

Please post your actual code instead of a picture. Thanks

not entirely sure how to do that so i’ll copy and paste it in this reply. My label element under the Improvements comment (What would you like to see improved) won’t appear in my preview window.

<!--FavFeat-->
            <fieldset>
              <label for="favfeat">What is your favorite feature of freeCodeCamp</label>
              <select id="favfeat">
                <option value="">Select an option</option>
                <option value="1">Challenges</option>
                <option value="2">Projects</option>
                <option value="3">Community</option>
                <option value="4">Open Source</option>
              </fieldset>
              <!--Improvements?-->
            <fieldset>
            <label>What would you like to see improved (Check all that apply)</label>
            </fieldset>
1 Like

I changed my code above to test if I could type other stuff into the preview window. The checkbox for “front end project” appears, however the “what would you like to see improved” text does not.

<!--FavFeat-->
            <fieldset>
              <label for="favfeat">What is your favorite feature of freeCodeCamp</label>
              <select id="favfeat">
                <option value="">Select an option</option>
                <option value="1">Challenges</option>
                <option value="2">Projects</option>
                <option value="3">Community</option>
                <option value="4">Open Source</option>
              </fieldset>
              <!--Improvements?-->
            <fieldset>
            <label>What would you like to see improved (Check all that apply)</label>
            <input id="front-end-projects" type="checkbox" value="front-end-projects"><label>Front-end projects</label>
            </fieldset>

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

please post all your code (from top to bottom)

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

looks like you have enough syntax errors here to possibly cause the browser to get confused (which affects what you see).

Can you paste your code into the online validator below and try to fix all the errors you see? (You can ignore the warnings and info reports)

2 Likes