Skip to content

Instantly share code, notes, and snippets.

@agrawalsajal02
Created September 3, 2019 19:40
Show Gist options
  • Save agrawalsajal02/63a7a0a61cb010f12cfeec8471e2cecc to your computer and use it in GitHub Desktop.
Save agrawalsajal02/63a7a0a61cb010f12cfeec8471e2cecc to your computer and use it in GitHub Desktop.
wvwPwgo
h1>this is my first web page</h1><h1>I want big text here</h1>
<ul>
<li>Make me a bullet point</li>
<li>Make me another bullet point</li>
</ul>
<button>Make Me A Button Here</button>
document.querySelector("button").addEventListener("click", function(){
document.body.style.background = randColor();
})
function randColor(){
return '#' + (function co(lor){ return (lor +=
[0,1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f'][Math.floor(Math.random()*16)])
&& (lor.length == 6) ? lor : co(lor); })('');
}
h1 {
color: purple;
}
button {
border: 2px solid #34495e;
background-color: #3498db;
color: white;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment