Why does <input> changes to <input /> after next question in html form?


As can be seen in the photo, what does the “/” indicate?

The forward slash at the end of the tag is optional for self-closing tags. It does no harm to be there but it isn’t required. Some people still use it but I think the trend is not to add the forward slash to the end of self-closing tags.

I’m seeing them on the input tags in the starter code for steps 26, 27, and 28. So I’m not sure what you mean by saying the input tags are changing? Perhaps I am missing something? Can you be more specific?

No, It is just my unability to express my message correctly, I just meant that even though I use “<“input”>” (I had to use double quotes to show input element) element this way, but when i go to the next exercise, the site automatically adds a slash before the end tag. Thankyou for beautifully answering this question.
Have a good day!

Ya, that’s because what you add to the HTML is not really carried over to the next step. Each step starts with its own fresh HTML that does not rely on what you entered in the previous step. So even though you used <input>, the starter HTML for the next step uses <input />.

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