HTML and CSS Reference
In-Depth Information
It's easy to make the mistake of thinking that h2 ~ p doesn't apply to paragraphs that follow <h3> headings.
But if they're siblings of the <h2> heading, the style rule does apply unless you create another rule to override
it. The styles in general-sibling2.html add another general sibling combinator to apply a different style to
paragraphs that follow <h3> headings:
h2 ~ p {
text-transform: uppercase;
h3 ~ p {
text-transform: none;
As Figure 13-8 shows, the paragraphs following the <h3> headings are now rendered normally.
Figure 13-8. A separate rule controls the paragraphs after the <h3> headings
Selecting Form Elements Based on Their State
HTML5 is making a major change in the way that browsers handle online forms by introducing new input types
and attributes, such as required , min , and max . Many browsers now also validate user input before the form is
Search WWH ::

Custom Search