Created
October 24, 2020 06:22
-
-
Save bipinrajbhar/96150dc0f5fbb09bf363a81b55fff87d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Excercise</title> | |
</head> | |
<body> | |
<script> | |
// create a root 'div' element | |
// 📜 https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement | |
// set id attribute to 'root' for root div element | |
// 📜 https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute | |
// append the root div element to body using append | |
// 📜 https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/append | |
// create a 'div' element | |
// 📜 https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement | |
// set the textContent of div element to 'Hello World' | |
// 📜 https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent | |
// append the div element to root div using append method | |
// 📜 https://developer.mozilla.org/en-US/docs/Web/API/ParentNode/append | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment