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 HeadingThis is some important text. |