/
Use of classes and divisions in CSS
Use of classes and divisions in CSS
/*Creating a class in css to manipulate css*/
document.body.innerHTML = “<h1>My Heading</h1><div class ='BLOCKone'>This is some text in block 1</div>”
/*Applying styling to the class that we created.*/
document.querySelector('.BLOCKone').style.border = ‘solid white 1px’
, multiple selections available,
Related content
Understand display : inline versus block
Understand display : inline versus block
More like this
CSS Selectors
CSS Selectors
More like this
How to use the class attribute of HTML elements.
How to use the class attribute of HTML elements.
More like this
HTML Structure
HTML Structure
More like this
Make a CSS sandbox!
Make a CSS sandbox!
More like this
CSS Colors
CSS Colors
More like this