- index.html
- style.css
- script.js
HTML
<!DOCTYPE html>
lang="en"
CSS
.products {
display: flex;
JavaScript
var makeElement = function (tagName, className, text) {
var element = document.createElement(tagName);
Console
GoalsCompleted 0 out of 3
- Replace value
listItem
withmakeElement('li', 'product')
and delete the string with addition of the class to this element. - Similarly, override the value of the
title
variable with the result of calling themakeElement
function with arguments'h2'
,'product__title'
,'Professional selfie stick'
. Below, remove the addition of the class and text content to the header. - Similarly, replace the value of the
price
variable and delete the strings of the code where a class and text content are added to theprice
element.
Comments