Skip to content

Instantly share code, notes, and snippets.

@poudelmadhav
Created August 27, 2018 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save poudelmadhav/ab8b99f929987a4b5f797fa1e1e96525 to your computer and use it in GitHub Desktop.
Save poudelmadhav/ab8b99f929987a4b5f797fa1e1e96525 to your computer and use it in GitHub Desktop.
<!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