Entradas

Mostrando las entradas etiquetadas como class

html

Using The class Attribute The HTML  class  attribute is used to define equal styles for elements with the same class name. So, all HTML elements with the same  class  attribute will get the same style. Here we have three  <div>  elements that  Example < !DOCTYPE  html > < html > < head > < style > .cities  {   background-color :  black ;   color :  white ;   margin :  20px ;   padding :  20px ; } < /style > < /head > < body > < div  class ="cities" >    < h2 > London < /h2 >    < p > London is the capital of England. < /p > < /div >  to the same class name: