Vererbung und Überschreibung


Dies sind die Formatvorgaben für Selektor P (p + Courier, 14 Punkt, zentiert, blau):

p { font-family: Courier; font-size: 14pt; text-align: center; color: blue; }

Dies sind Formatvorgaben für den Selektor H2 (h2 + rot):

h2 { color: red; }

hier wird von Selektor H2 an Selektor U vererbt

U ist "Standard"-Selektor "Unterstreichung"

hier wird Vererbung des Selektors P durch explizite Angabe für Selektor U überschrieben:

p u{ font-family: Verdana; color: green; }