Created
August 27, 2018 17:50
-
-
Save poudelmadhav/ab8b99f929987a4b5f797fa1e1e96525 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>JavaScript</title> | |
</head> | |
<body> | |
<script> | |
let d = document; | |
// d.querySelector("body").style.backgroundColor = "#f7f7f7"; | |
// d.querySelector("body").style.backgroundImage = "url('images/background.jpg')"; | |
// d.querySelector("body").style.backgroundPosition = "center center"; | |
// d.querySelector("body").style.backgroundRepeat = "no repeat"; | |
// d.querySelector("body").style.backgroundAttachment = "fixed"; | |
// d.write("<h1 class='madhav' id='manju'>Madhav</h1><h1 class='madhav' id='manju'>Paudel</h1>"); | |
// let ales = d.querySelectorAll("h1"); | |
// ales[0].style.backgroundColor = "red"; | |
// d.querySelector(".madhav").style.backgroundColor = "red"; | |
d.write("<h1>Madhav Paudel</h1>"); | |
d.write("<p>I am a student of B. Sc. CSIT at Swastik college.") | |
d.querySelector("h1").style.color = "green"; | |
d.write("<img src=images/prof.jpg"); | |
d.querySelector("img").style.width = "100px"; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment