Class: Style Inline Elements

When defined in the <style> element, the HTML class attribute also makes it possible to define equal styles for "equal" inline elements, such as <span>:

HTML file: Displayed by browser:
<style>
span.note {font-size:120%;color:red;}
</style>
<body>
  <h1>My <span class="note">Important</span> Heading</h1>
  <p>This is some <span class="note">important</span> text.</p>
</body>

My Important Heading

This is some important text.


Back button Table of Contents Next button