
Define CSS terminology by explaining selectors: element, class, and id, before curly braces, and explore declarations and declaration blocks with properties and values like font-family, font-size, and color.
learn to use the element selector to style all instances of a tag—paragraphs, headings, links, and images—by applying color, decoration, and other properties, including custom element names and its specificity.
Master the css class selector using dot notation to target elements by class names like title or market. Explore interactions with element selectors, specificity, and practical bootstrap examples.
learn how to apply an id attribute to an element, compare id selectors with class and element selectors, and master specificity to override styles for precise targeting.
Group multiple selectors with a comma to apply the same color across paragraphs, headings, and lists. Use element, class, or mixed selectors for precise styling and avoid global changes.
Master descendant selectors to style elements by their ancestors using the space combinator. See how spacing creates or restricts styles against compound selectors.
Master parent-child selectors to target direct children and descendants within complex HTML structures, applying precise styles to anchors, paragraphs, and sections using group and descendant selectors.
Explore adjacent and general sibling selectors in CSS, using the plus sign to target direct next siblings and the general sibling selector to style all later siblings, with practical examples.
Master attribute selectors to target elements by attribute and value using square-bracket syntax. See class, id examples and apply styles such as a red border to matches.
Use exact match attribute selectors to target elements by a precise attribute value, and any word selectors to match any word within an attribute, such as class values and links.
Apply beginning and end attribute selectors to target elements by their attribute values, using the caret for beginning and the dollar sign for end to style external and downloadable links.
Learn how the substring attribute selector picks elements by a substring in an attribute value using the *= operator, with bem naming conventions and examples like Google and Facebook.
Explore link pseudo-class selectors in CSS, styling unvisited and visited links, hover states, and active states, including color, padding, alignment, and removing underlines for a polished navigation.
Master the CSS focus selector to boost usability and accessibility, cover keyboard navigation and focus outlines, and use attribute selectors to style inputs by type and focus states.
Explore required, optional, and checked selectors to style forms with visual cues using attribute selectors, applying borders and drop shadows to inputs, textareas, radios, and checkboxes.
Explore how to style disabled and enabled form elements with CSS selectors, including placeholder and placeholder-shown, using color, borders, shadows, and ellipsis for responsive forms.
Learn to use valid and invalid selectors to validate form inputs like emails and required fields. Style valid inputs green and invalid ones red to communicate form status.
Explore how first-child, last-child, and only-child selectors target the first, last, or only child elements, with practical examples using headings, sections, lists, and links.
Explore first-of-type, last-of-type, and only-of-type selectors in CSS. See how they select elements by type, not by parent-child relationships, with examples across headings, paragraphs, anchors, and lists.
Explore nth-child selectors to target first, last, and specific list items or table rows, including odd and even patterns, and apply styles such as width, weight, color, and link-like effects.
Explore how to use the nth-child selector to match patterns, including starting from a specific row, applying offsets, and selecting every nth item (odd or even) across lists and tables.
demonstrates using the nth-type selector to target every second element by type (not by child), with offset options to start from a specific item in a section.
Learn to count backward in CSS selectors using nth-last-child, last-child, and last-of-type; start from a given row, apply negative offsets, and target elements from the end.
Define css variables in the root selector to centralize values like primary color and font size, so updates propagate across headings, links, and layout.
Explore the target pseudo-class selector to visually indicate the focused element on a web page, highlighting the current target with font size and background changes.
Explore the empty selector in CSS, and learn how it targets elements with no content to apply backgrounds and sizes, demonstrating how spaces affect emptiness and practical uses.
This lecture demonstrates the negation selector in CSS, showing how to target elements by attribute presence or absence, combine with last-child and not selectors to refine styling.
explore before and after pseudo-element selectors to dynamically insert content such as badges, style with padding and borders, and use first-of-type and href attributes to display link locations after text.
Master first-letter, first-line, and selection selectors to create drop caps, adjust font size, margins, padding, and background colors for stylish, readable blog or article text.
Learn to use CSS selectors with JavaScript to create dynamic behavior. Use document.querySelector and document.querySelectorAll to style paragraphs, links, and lists, and apply attribute selectors and forEach loops.
Wrap up: recap basic selectors, combinator and attribute selectors to target elements, and get ready to use them in your own world project.
20 years ago when I could first write the CSS with HTML document, we had a limited set of selector choices like- element, classes, ids and descendant selectors.
But now we have dozens and dozens of powerful CSS selectors we can use in your CSS to write more powerful, optimized CSS selectors to maintain our stylesheet.
So in this class discover how to effectively leverage the power of selectors to select the elements you want to style without adding classes, changing HTML, or getting overly specific with your selectors.
In this course, I will demonstrate how to pinpoint specific parts (and groups of parts) in an HTML document using the powerful declarative syntax of CSS selectors.
I will cover combinator selectors, attribute selectors, pseudo-class and pseudo-element selectors, and the universal selector.
But that’s not all, there is a bonus video for you where I’ll show you how you can use CSS selectors with javascript to add dynamic behaviour in your HTML document with real-world examples.
Topics include:
Targeting elements, classes and IDs
Working with compound and group selectors
Targeting parent, child, and sibling elements (combinator)
Targeting element attributes
Targeting links with pseudo-class selectors
Targeting child elements and empty elements
Working with negation elements
Styling and validating forms
Matching pattern with Nth-child Selectors
Creating custom global variables
Using selectors with javascript.
Who this course is for:
New web enthusiasts and front-end developers
Complete beginners who want to enhance their skill sets
Experts who want to reinforce themselves
Anyone who wants to refresh knowledge
Web designers and developers
Developers who are tired of fighting with CSS
Professionals who want to level up CSS skills
So if you’re ready to be one of the top 10% fronted developers then roll-up your sleeves, fire-up your code editor and let’s get started with CSS selectors- the complete guide.