Search

HTML Classes

The HTML Class Attribute is used to define equal styles and JavaScript event  for elements with the same Class name.

All HTML elements with the same Class attribute will get multiple place the same style property .

Example : - 

<!DOCTYPE html> 
<html>
   <head>
      <title>HTML Classe Attribute</title>
      <style> .font-color{ color: red; } </style>
   </head>
   <body>
      <p class="font-color">HTML Class Attribute example </p>
   </body>
</html>

Stack Overlode is optimized Tutorials and examples for learning and training. Examples might be simplified to improve reading and learning and understand. Tutorials and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using Stack Overlode, you agree to have read and accepted our terms of use, cookie and privacy policy.