8. Different Types of Selectors
Selectors are used to specify what XHTML MP elements should a WAP CSS style rule be applied to. Up to now, we have used only one kind of selector called the type selector in cascading style sheets. There are other kinds of selectors available in WCSS and they can be very useful to you. You can learn some of the more useful ones below.
8.1. Type Selector
In all the WAP CSS examples mentioned previously, we used XHTML MP element names as the selector. Such kind of selector is called the type selector. It should be noted that element names are case-sensitive in XHTML MP and they must be in lowercase. This means type selectors in WCSS cascading style sheets must also be in lowercase. For example, the following WCSS code is incorrect because the type selector "H1" is not in lowercase.
H1
{
font-style: italic
}
This is the correct version of the above WCSS code:
h1
{
font-style: italic
}
The above style statement specifies that the style rule "font-style: italic" should be applied to all <h1> tags.
Previous Page | Page 7 of 39 | Next Page |
- 1. WCSS (WAP CSS) Introduction
- 2. Wireless CSS and Wireless Profile CSS
- 3. Advantages of Using WAP CSS Style Sheets on Mobile Internet Sites
- 4. Disadvantages of Using WAP CSS Style Sheets on Mobile Internet Sites
- 5. Syntax Rules of WCSS
- 6. Comments in WCSS
- 7. How to Apply WCSS Styles to an XHTML MP Document
- 8. Different Types of Selectors
- 9. Div and Span Element of XHTML MP
- 10. Cascading Rules for Handling Multiple Groups of WCSS Styles Applied to the Same Element
- 11. Common Types of Property Value
- 12. WCSS Font and Text Properties
- 13. WCSS List Properties
- 14. WCSS Color Properties
- 15. WCSS Border Properties
- 16. WAP Specific Extensions to CSS
- 17. WCSS Access Key Extension
- 18. WCSS Input Extension
- 19. WCSS Marquee Extension
- 20. Matching WCSS Cascading Style Sheets to Different User Agents