Cheers mate! I don't think there are many scenarios where you'd want to use the createAtrribute method, I would just stick with setAttribute as it's much shorter to write
i would recommend watching the other video this person made link: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-VW8kNAous88.html which teaches how to dynamically create elements, but basicly in the video he writes line of code document.body.appendChild([here Is variable that contains the element]); the important part Is the 'body', this part of the code specifies where the element Is gonna be created, but it has to be a variable for example you want to create new element in div that has id: beforeTest So what u gonna type Is let div = document.getElementById("#beforeTest") And then u gonna type document.div.appendChild(....)