Learn Form Validation by Building a Calorie Counter - Step 52

Tell us what’s happening:

I just have a quick question, why are we making HTML components in the javascript section?

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region



// User Editable Region

Your browser information:

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

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 52

Because JavaScript was designed to manipulate websites writen in HTML/CSS.

so then what is the point of having a separate HMTL file/page

Because jumbling everything together is very confusing

I see, so why did we add that HTML code to the HTML file?

Because you would not put HTML in a JavaScript file?

No i mean the HTML in the javascript, why dont we move it to the HTML file

That’s where the HTML is, in the HTML file.

In the JS file is JS that manipulates the HTML