Use class
attribute for CSS and id
attribute for JavaScript.
html
<div class="container" id="container"></div>
css
.container { background: '#aaa' }
js
var container = document.getElementById('container');
10 October 2014
Use class
attribute for CSS and id
attribute for JavaScript.
<div class="container" id="container"></div>
.container { background: '#aaa' }
var container = document.getElementById('container');