diff --git a/session18/index.html b/session18/index.html new file mode 100644 index 0000000..83d6601 --- /dev/null +++ b/session18/index.html @@ -0,0 +1,13 @@ + + + + + + + Document + + +
Ceci est un élément à supprimer grâce à JavaScript.
+ + + \ No newline at end of file diff --git a/session18/script.js b/session18/script.js new file mode 100644 index 0000000..e33665a --- /dev/null +++ b/session18/script.js @@ -0,0 +1,28 @@ +let body = document.querySelector("body"); +body.style.margin = 0; + +let header = document.createElement("header"); +header.innerHTML = "
Bienvenue
"; +header.style.backgroundColor = "#e3b04b"; +header.style.textAlign = "center"; +header.style.color = "#ffffff"; +header.style.fontSize = "2em"; +header.style.paddingTop = "0.5em"; +header.style.paddingBottom = "0.5em"; + +let nav = document.createElement("nav"); +nav.innerHTML = "
Accueil / Une autre page
"; +nav.style.backgroundColor = "#f1d6ab"; +nav.style.paddingTop = "0.5em"; +nav.style.paddingBottom = "0.5em"; +nav.style.paddingLeft = "1em"; + +let text = document.createElement("paragraphe"); +text.innerHTML = "

Ceci est un paragraphe créé avec javascript

"; +text.style.textIndent = "1em"; + +document.body.append(header, nav, text); + +document.querySelector("#a-supprimer").remove(); + +console.log("ok"); \ No newline at end of file