This document discusses using CSS selectors to style HTML elements. It covers choosing the correct selector to reference an element, defining element, style, and attribute selectors, and finding elements using pseudo-elements and pseudo-classes like :before and :first-child. The goal is to learn how to control and differentiate the styling of elements using CSS selectors.
1 of 3
Download to read offline
More Related Content
CSS Selectors
1. CSS Selectors
Find elements by using CSS selectors and
jQuery
Structure a CSS file by using CSS selectors
2. Agenda
Choose the correct selector to reference an element.
Define element, style, and attribute selectors.
Find elements by using pseudo-elements and pseudo-
classes (for example, :before, :first-line, :first-letter, :target,
:lang, :checked, :first-child)Reference elements correctly.
Implement inheritance; override inheritance by using
!important
Style an element based on pseudo-elements and pseudo-
classes (for example, :before, :first-line, :first-letter, :target,
:lang, :checked, :first-child).
http://www.w3schools.com/cssref/css_selectors.asp
3. Goal and Objective
How can control the style of the our html elements using CSS
selectors.
how we can differentiate element or using different style for
elements of the same type.