A Pen by Sajal Agrawal on CodePen.
Created
September 3, 2019 19:40
-
-
Save agrawalsajal02/63a7a0a61cb010f12cfeec8471e2cecc to your computer and use it in GitHub Desktop.
wvwPwgo
This file contains hidden or 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
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> |
This file contains hidden or 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
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); })(''); | |
} |
This file contains hidden or 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
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