<style type=“text/css”>
p. indent {margin 0 0 1em 0}
</style>
A class definition may be used many times throughout a
document, but an ID may only be used once.
| in the style sheet | in the body | |
|---|---|---|
| Class example | em .abcd {font-weight: 300;} | <em class=“abcd”> |
| Another Class example | .efgh {font-color: #00ff00;} | <p class=“efgh”> |
| ID example | #ijkl {text-align: right} | <span id=“ijkl”> |
| Mixed Example | .mnop {font-color: #00ff00;} #qrst {text-align: right} | <p id=“mnop” class=“qrst”> Hint: the output will be both green and right justified. |