Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

css javascript

//on HTML *Purist Style*           || *Only JavaScript*
<style>                            // 
.example {						   // para.style.color = 'white';
  color: white;			 		   // para.style.background = 'black';
  background-color: black;		   // para.style.padding = '10px';
  padding: 10px;				   // para.style.width = '250px';
  width: 250px; 				   // para.style.textAlign = 'center';
  text-align: center;
}
</style>
// on JavaScript
Element.setAttribute('class', 'highlight');
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #css #javascript
ADD COMMENT
Topic
Name
1+2 =