Created
November 25, 2019 14:29
-
-
Save mrfoxtalbot/6f56094adcaa6a27ca51800a974977d4 to your computer and use it in GitHub Desktop.
JS Add inline CSS styles
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
// Selecting element | |
var elem = document.getElementById("intro"); | |
// Appling styles on element, not camelCase on attributes | |
elem.style.color = "blue"; | |
elem.style.fontSize = "18px"; | |
elem.style.fontWeight = "bold"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment