diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c218c028c56a411b2a379a.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c218c028c56a411b2a379a.md index c581ea2931e..95d71b68743 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c218c028c56a411b2a379a.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c218c028c56a411b2a379a.md @@ -9,22 +9,29 @@ dashedName: step-49 To see your new HTML content for the `targetInputContainer`, you will need to use the innerHTML property. -The `innerHTML` property sets or returns the HTML content inside an element. Here is an example of how to use it: +The `innerHTML` property sets or returns the HTML content inside an element. + +Here is a `form` element with a `label` and `input` element nested inside. ```html -
Example paragraph
-adding new content
+const formElement = document.getElementById("form"); +const formContent = ` + + `; +formElement.innerHTML += formContent; ``` -Add your new `HTMLString` to the `targetInputContainer` by using the `innerHTML` property. Remember to use the `+=` operator to add to the existing HTML instead of replacing it. +Use the addition assignment operator `+=` to append your `HTMLString` variable to `targetInputContainer.innerHTML`. # --hints--