Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<!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
You can’t perform that action at this time.