iTGid.info - Alex Lushchenko's courses
🪬 JavaScript 24 Course: https://itgid.info/ru/course/js24
🫶 Thank the author - Monobank: 5375414126666006 Lushchenko O
🍹 Donate - https://www.buymeacoffee.com/itgid
✈️ Ask a question via Telegram: https://telegram.me/itgid_admin
Author's courses:
ReactJS: https://itgid.info/ru/course/reactjs
Array Methods: https://itgid.info/ru/course/arraymethod
RU Channel: / itgid
UA Channel: / @itgidua-web7836
00:00 Sprint overview
01:00 Creating elements with innerHTML
02:20 Creating elements with createElement
04:40 Adding elements to the page with append
09:50 The after() method for adding elements
10:20 The before() method for adding elements
11:20 The prepend() method for adding elements
12:00 Creating an image with createElement
15:50 Creating an input with createElement
19:00 Adding an event to the created element
We learn how to create HTML elements with JavaScript and add them to the DOM. We create a paragraph, div, image, and input element, and add classes, attributes, and text. We insert elements into the page using the after, before, prepend, and append methods. We explore the capabilities of outerHTML and insertAdjacentHTML.