mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-07 12:15:51 +00:00
39 lines
849 B
HTML
39 lines
849 B
HTML
<html>
|
|
<title>Example 5</title>
|
|
<head>
|
|
<style>
|
|
P {
|
|
color: black;
|
|
background-color: yellow;
|
|
}
|
|
P#reverse {
|
|
color: yellow;
|
|
background-color: black;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>Example 5: CSS with ID's </h1>
|
|
<pre>
|
|
This document contains the following CSS:
|
|
|
|
P {
|
|
color: black;
|
|
background-color: yellow;
|
|
}
|
|
P#reverse {
|
|
color: yellow;
|
|
background-color: black;
|
|
}
|
|
</pre>
|
|
<pre>This following paragraph has no ID</pre>
|
|
<P>This is a paragraph. We should be yellow because there is a style rule indicating
|
|
that all paragraphs have a background of yellow.</P>
|
|
<pre ID=reverse>The following paragraph has ID="reverse"</pre>
|
|
<P ID=reverse>This is a paragraph. We should be black with yellow text because
|
|
there is a style rule indicating that this paragraph should have a background
|
|
of black with yellow text.</P>
|
|
</body>
|
|
</html>
|
|
|