This document provides information about CSS pseudo-classes. It defines several types of pseudo-classes including dynamic, structural, and others. Dynamic pseudo-classes like :hover and :active select elements when a user interacts with them. Structural pseudo-classes select elements based on their position in a document tree, such as :first-child to select the first child element. The document provides examples of how to use different pseudo-class selectors in CSS code to style elements.
This document provides an introduction and overview of CSS (Cascading Style Sheets). It discusses what CSS is, its advantages, basic structure and syntax, applying styles using internal, external and inline styles, style precedence, and how to use IDs, classes, divs, spans and other selectors to control layout and formatting of text, links, backgrounds, fonts, lists and tables. The document covers many fundamental CSS concepts in a tutorial-like format.
This document summarizes CSS Grid Layout, a new two-dimensional grid system being added to CSS. It discusses some of the limitations of existing CSS layout methods and how Grid Layout addresses them. Key points include: Grid Layout uses line-based placement to position items, grid tracks can be flexible or fixed widths, areas can be explicitly or implicitly named, and the system avoids hacks and limitations of previous methods.
This document provides tips for best practices when writing CSS code. It recommends avoiding inline styles, header styles, multiple CSS files, and !important. It also recommends using shorthand properties, avoiding universal selectors and IDs when possible, optimizing images, and using CSS3 properties instead of images. In summary, the document outlines techniques for writing efficient, well-structured CSS code to improve performance and maintainability.
There are 6 types of CSS selectors: simple, class, generic, ID, universal, and pseudo-class selectors. Simple selectors apply styles to single elements. Class selectors allow assigning different styles to the same element on different occurrences. ID selectors define special styles for specific elements. Generic selectors define styles that can be applied to any tag. Universal selectors apply styles to all elements on a page. Pseudo-class selectors give special effects like focus and hover.
This document provides an introduction to CSS (Cascading Style Sheets) including what CSS is, where it can be used, CSS syntax, and key concepts like inheritance and the cascade. CSS is used to style and lay out HTML elements on a page. It allows customizing elements with properties like color, font, size and more. CSS can be included inline with HTML, embedded in the HTML <head> with <style> tags, or linked externally in a .css file. The cascade determines which styles take precedence when multiple selectors apply to the same element. Inheritance applies styles to descendant elements.
This document provides an overview of CSS Grid layout and its properties for creating grid-based page layouts. CSS Grid allows dividing available space into columns and rows, and placing elements into specific areas. Key properties include display: grid;, grid-template-columns/rows to define the grid structure, and grid-column/row to position items. Grid provides a two-dimensional layout system as opposed to the one-dimensional Flexbox, and is well-suited for page-level layouts rather than component-level layouts.
This document introduces Sass (Syntactically Awesome Style Sheets), a CSS preprocessor. Sass allows writing clean CSS in a programming construct rather than static rules, reducing repetition and creating more manageable stylesheets. It features variables, nesting, mixins, partials, and inheritance. Installing Sass involves downloading Ruby and using the gem install command. Key benefits of Sass include writing cleaner CSS, faster development time, and programmatic features like variables and nesting.
CSS (Cascading Style Sheets) is a stylesheet language used to describe the presentation of a document written in HTML or XML. CSS saves lots of work as formatting elements only need to be applied to one CSS file rather than individually formatting every HTML page. CSS rules consist of selectors that point to the HTML element to style paired with a declaration block containing CSS properties and values to determine how that element will look. Common CSS properties include those to control text formatting, background effects, borders, lists, links and positioning.
This document discusses cascading style sheets (CSS) and provides examples of using different CSS selectors and properties. It covers:
1) The three levels of style sheets - inline, document, and external - and how lower level styles can override higher level styles.
2) Examples of using external, document, and inline style sheets.
3) Different types of CSS selectors like class, ID, universal, and pseudo-class selectors.
4) CSS property value forms like keywords, numbers, and lengths that can be used with different properties.
This document provides an overview of HTML and CSS topics including:
- A brief history of HTML and CSS standards from 1990 to present.
- Descriptions of common HTML elements like <body>, <head>, <img>, <a>, and lists.
- Explanations of CSS concepts like selectors, properties, units, positioning, and layout fundamentals.
- Details on CSS topics like the box model, centering content, semantic HTML, and flexbox.
The document serves as a course outline or reference for learning HTML and CSS fundamentals.
Pseudo-classes are used to define special states of CSS elements. They allow styling elements when a user mouses over, focuses on, visits, or activates them. Common pseudo-classes include :hover, :focus, :visited, and :active. Pseudo-classes can be used with CSS classes and selectors like :first-child to style specific elements, such as styling the first <p> element or changing the color of a link on hover. Pseudo-elements like ::before and ::after allow inserting content before or after elements.
HTML is a markup language used to define the structure and layout of web pages. It uses tags like <h1> and <p> to mark headings and paragraphs. CSS is used to style and lay out HTML elements, using selectors, declarations, and properties to change things like colors and positioning. JavaScript can be added to HTML pages with <script> tags and is used to add interactive elements and dynamic behavior by manipulating HTML and responding to user input. It has data types like strings and numbers and control structures like if/else statements.
HTML & CSS are languages used to structure and style web pages. HTML provides the content structure using elements, tags, and attributes. CSS controls the style and layout using selectors, properties, and values. Some common HTML terms include elements, tags, and attributes. A basic HTML document structure includes DOCTYPE, html, head, title, and body tags. CSS can be used to style HTML elements by selecting them with tags, classes, IDs and applying properties like color, font-size, background, and more.
- CSS3 is made up of modular components at different stages of development rather than a single specification. These include selectors, properties, and other modules.
- CSS selector capabilities were expanded in CSS3 with things like attribute selectors that select elements based on attributes, pseudo-classes for dynamic states like hover and active, and structural pseudo-classes for things like first-child.
- CSS4 is extending selector functionality further with things like the :matches pseudo-class to apply rules to groups of selectors, pseudo-classes for time-based states, and grid selector features. Support for CSS4 selectors is starting to appear in modern browsers.
CSS is used to style and lay out web pages. There are three types of CSS: external, internal, and inline stylesheets. External stylesheets define styles in CSS files and can be used across many web pages, internal stylesheets are defined within the <style> tags in an HTML page, and inline styles are defined within HTML elements using the style attribute. CSS selectors allow targeting specific elements using IDs, classes, types, and other attributes to style them. Common CSS properties include colors, backgrounds, borders, padding, margins, and styling of links and lists.
This document summarizes various CSS properties that can be used to style HTML tables. It describes properties such as border-collapse, border-spacing, caption-side, empty-cells, and table-layout that control the appearance and layout of table borders, cell spacing, caption placement, empty cell styling, and layout algorithm respectively. Examples are provided to demonstrate the effects of each property.
This document provides an overview of JavaScript arrays, including:
- Declaring and initializing different types of arrays such as associative arrays and indexed arrays
- Common array methods like push(), pop(), splice(), and slice()
- Array attributes including length, indexOf, and typeOf
- Techniques for adding, removing, and modifying array elements
All you need to know about CSS:
Selectors
Value Processing
Cascading
Box Model
Visual Formatting Model
Block Formatting Context
Stacking Context
At-Rules
Units
Presentation with examples:
http://rawgit.com/vzhidal/HTML-CSS-Training-Presentations/master/css-basics.html
Cascading Style Sheets (CSS) is a mechanism for adding style to HTML documents. CSS allows complete control over layout, design and formatting of web pages. CSS properties can be applied inline, internally via <style> tags, or externally via linked style sheets. CSS uses selectors to apply styles to HTML elements based on their id, class, type and other attributes. Declarations are made up of properties and values to specify styles.
Media queries allow CSS styles to be applied conditionally based on characteristics of the device viewing the content, like screen width. They provide a way to target specific devices and change layouts without changing the HTML. The document discusses the syntax of media queries, including using media types, features, expressions, and keywords. It provides examples of using media queries to load different style sheets or apply different CSS rules for different screen widths.
The document provides an overview of HTML, CSS, JavaScript and jQuery. It describes what each technology is, examples of common tags and syntax, and how they are used together. HTML is a markup language used to define the structure and layout of web pages using tags. CSS is used to style and lay out HTML elements, and can be linked externally or embedded internally or inline. JavaScript can be used to add interactive elements and dynamic behavior to HTML pages client-side. jQuery is a JavaScript library that simplifies tasks like HTML document traversal and manipulation, events, animations and Ajax.
this presentation covers the following topics which are as follows
1. Introduction of css
2. History of css
3. Types of css styling
4. Css syntax
5. Css Selector
6. Css Variations Or Css Versions
CSS (Cascading Style Sheets) is a style sheet language used to describe the presentation of structured documents written in HTML. CSS controls the layout of multiple documents from a single style sheet and allows for more precise control over layouts and different styles for different media like screens and print. CSS syntax uses selectors to apply styles denoted by properties and values to HTML elements. Styles can be applied inline, internally in the <style> tag, or externally in a separate .css file linked via the <link> tag.
This document provides an overview of HTML topics that will be covered in lectures 4, 5, and 6 of a web programming course. It discusses HTML, HTML forms, common HTML tags and their purposes, text formatting tags, images, links, tables, lists, and forms. It also covers iframes, framesets, block and inline elements, the <div> and <span> tags, layouts, and buttons. The document serves as an outline of key HTML concepts and elements that will be explored in more depth during the lectures.
The document discusses Cascading Style Sheets (CSS), which is a stylesheet language used to describe the presentation of HTML and XML documents. CSS describes how elements should be rendered on screen, paper, speech, or other media. CSS declarations contain a property and value pair that applies styles to elements, and CSS rules combine selectors and declarations. CSS rules can be defined internally, externally, or inline. CSS properties control elements' appearance, including colors, fonts, dimensions, positioning, and more. The cascade, inheritance, specificity, and box model determine which styles get applied.
This document provides an introduction to JavaScript, including:
- JavaScript is a scripting language used to programmatically access computational objects in a host environment and is prototype-based and dynamically typed.
- It was initially created by Netscape in 1995 under the name LiveScript and later renamed to JavaScript.
- JavaScript implementations have three main parts - the core ECMAScript language, the Document Object Model (DOM) for manipulating HTML/XML documents, and the Browser Object Model (BOM) for accessing browser capabilities.
- The DOM represents documents as nodes that can be traversed and manipulated, with levels that have added functionality over time. The BOM allows manipulating browser windows and accessing information about the browser, screen,
12- Learn CSS Fundamentals / Mix & groupIn a Rocket
Learn CSS fundamentals really fast, online and free.
FULL COURSE: http://inarocket.com
Learn front end development fast, step-by-step and with ready-to-use code.
IN THIS MODULE YOU'LL LEARN:
- How to mix selectors (eg. Combine classes and IDs).
- How to group selectors as a best practice to get a much optimized CSS.
READY-TO-USE CODE:
http://localhost/courses/css/css-fundamentals/mix-group.php
BEST BOOKS TO LEARN CSS:
- CSS: The Definitive Guide: Visual Presentation for the Web by O'Reilly Media. https://amzn.to/2VOWHQT
- HTML and CSS: Design and Build Websites by John Wiley & Sons. https://amzn.to/2Ir5y3i
- CSS: The Missing Manual by O'Reilly Media. https://amzn.to/2ImdyTf
- CSS Visual Dictionary by Independently published. https://amzn.to/2xgwHUh
This document discusses cascading style sheets (CSS) and provides examples of using different CSS selectors and properties. It covers:
1) The three levels of style sheets - inline, document, and external - and how lower level styles can override higher level styles.
2) Examples of using external, document, and inline style sheets.
3) Different types of CSS selectors like class, ID, universal, and pseudo-class selectors.
4) CSS property value forms like keywords, numbers, and lengths that can be used with different properties.
This document provides an overview of HTML and CSS topics including:
- A brief history of HTML and CSS standards from 1990 to present.
- Descriptions of common HTML elements like <body>, <head>, <img>, <a>, and lists.
- Explanations of CSS concepts like selectors, properties, units, positioning, and layout fundamentals.
- Details on CSS topics like the box model, centering content, semantic HTML, and flexbox.
The document serves as a course outline or reference for learning HTML and CSS fundamentals.
Pseudo-classes are used to define special states of CSS elements. They allow styling elements when a user mouses over, focuses on, visits, or activates them. Common pseudo-classes include :hover, :focus, :visited, and :active. Pseudo-classes can be used with CSS classes and selectors like :first-child to style specific elements, such as styling the first <p> element or changing the color of a link on hover. Pseudo-elements like ::before and ::after allow inserting content before or after elements.
HTML is a markup language used to define the structure and layout of web pages. It uses tags like <h1> and <p> to mark headings and paragraphs. CSS is used to style and lay out HTML elements, using selectors, declarations, and properties to change things like colors and positioning. JavaScript can be added to HTML pages with <script> tags and is used to add interactive elements and dynamic behavior by manipulating HTML and responding to user input. It has data types like strings and numbers and control structures like if/else statements.
HTML & CSS are languages used to structure and style web pages. HTML provides the content structure using elements, tags, and attributes. CSS controls the style and layout using selectors, properties, and values. Some common HTML terms include elements, tags, and attributes. A basic HTML document structure includes DOCTYPE, html, head, title, and body tags. CSS can be used to style HTML elements by selecting them with tags, classes, IDs and applying properties like color, font-size, background, and more.
- CSS3 is made up of modular components at different stages of development rather than a single specification. These include selectors, properties, and other modules.
- CSS selector capabilities were expanded in CSS3 with things like attribute selectors that select elements based on attributes, pseudo-classes for dynamic states like hover and active, and structural pseudo-classes for things like first-child.
- CSS4 is extending selector functionality further with things like the :matches pseudo-class to apply rules to groups of selectors, pseudo-classes for time-based states, and grid selector features. Support for CSS4 selectors is starting to appear in modern browsers.
CSS is used to style and lay out web pages. There are three types of CSS: external, internal, and inline stylesheets. External stylesheets define styles in CSS files and can be used across many web pages, internal stylesheets are defined within the <style> tags in an HTML page, and inline styles are defined within HTML elements using the style attribute. CSS selectors allow targeting specific elements using IDs, classes, types, and other attributes to style them. Common CSS properties include colors, backgrounds, borders, padding, margins, and styling of links and lists.
This document summarizes various CSS properties that can be used to style HTML tables. It describes properties such as border-collapse, border-spacing, caption-side, empty-cells, and table-layout that control the appearance and layout of table borders, cell spacing, caption placement, empty cell styling, and layout algorithm respectively. Examples are provided to demonstrate the effects of each property.
This document provides an overview of JavaScript arrays, including:
- Declaring and initializing different types of arrays such as associative arrays and indexed arrays
- Common array methods like push(), pop(), splice(), and slice()
- Array attributes including length, indexOf, and typeOf
- Techniques for adding, removing, and modifying array elements
All you need to know about CSS:
Selectors
Value Processing
Cascading
Box Model
Visual Formatting Model
Block Formatting Context
Stacking Context
At-Rules
Units
Presentation with examples:
http://rawgit.com/vzhidal/HTML-CSS-Training-Presentations/master/css-basics.html
Cascading Style Sheets (CSS) is a mechanism for adding style to HTML documents. CSS allows complete control over layout, design and formatting of web pages. CSS properties can be applied inline, internally via <style> tags, or externally via linked style sheets. CSS uses selectors to apply styles to HTML elements based on their id, class, type and other attributes. Declarations are made up of properties and values to specify styles.
Media queries allow CSS styles to be applied conditionally based on characteristics of the device viewing the content, like screen width. They provide a way to target specific devices and change layouts without changing the HTML. The document discusses the syntax of media queries, including using media types, features, expressions, and keywords. It provides examples of using media queries to load different style sheets or apply different CSS rules for different screen widths.
The document provides an overview of HTML, CSS, JavaScript and jQuery. It describes what each technology is, examples of common tags and syntax, and how they are used together. HTML is a markup language used to define the structure and layout of web pages using tags. CSS is used to style and lay out HTML elements, and can be linked externally or embedded internally or inline. JavaScript can be used to add interactive elements and dynamic behavior to HTML pages client-side. jQuery is a JavaScript library that simplifies tasks like HTML document traversal and manipulation, events, animations and Ajax.
this presentation covers the following topics which are as follows
1. Introduction of css
2. History of css
3. Types of css styling
4. Css syntax
5. Css Selector
6. Css Variations Or Css Versions
CSS (Cascading Style Sheets) is a style sheet language used to describe the presentation of structured documents written in HTML. CSS controls the layout of multiple documents from a single style sheet and allows for more precise control over layouts and different styles for different media like screens and print. CSS syntax uses selectors to apply styles denoted by properties and values to HTML elements. Styles can be applied inline, internally in the <style> tag, or externally in a separate .css file linked via the <link> tag.
This document provides an overview of HTML topics that will be covered in lectures 4, 5, and 6 of a web programming course. It discusses HTML, HTML forms, common HTML tags and their purposes, text formatting tags, images, links, tables, lists, and forms. It also covers iframes, framesets, block and inline elements, the <div> and <span> tags, layouts, and buttons. The document serves as an outline of key HTML concepts and elements that will be explored in more depth during the lectures.
The document discusses Cascading Style Sheets (CSS), which is a stylesheet language used to describe the presentation of HTML and XML documents. CSS describes how elements should be rendered on screen, paper, speech, or other media. CSS declarations contain a property and value pair that applies styles to elements, and CSS rules combine selectors and declarations. CSS rules can be defined internally, externally, or inline. CSS properties control elements' appearance, including colors, fonts, dimensions, positioning, and more. The cascade, inheritance, specificity, and box model determine which styles get applied.
This document provides an introduction to JavaScript, including:
- JavaScript is a scripting language used to programmatically access computational objects in a host environment and is prototype-based and dynamically typed.
- It was initially created by Netscape in 1995 under the name LiveScript and later renamed to JavaScript.
- JavaScript implementations have three main parts - the core ECMAScript language, the Document Object Model (DOM) for manipulating HTML/XML documents, and the Browser Object Model (BOM) for accessing browser capabilities.
- The DOM represents documents as nodes that can be traversed and manipulated, with levels that have added functionality over time. The BOM allows manipulating browser windows and accessing information about the browser, screen,
12- Learn CSS Fundamentals / Mix & groupIn a Rocket
Learn CSS fundamentals really fast, online and free.
FULL COURSE: http://inarocket.com
Learn front end development fast, step-by-step and with ready-to-use code.
IN THIS MODULE YOU'LL LEARN:
- How to mix selectors (eg. Combine classes and IDs).
- How to group selectors as a best practice to get a much optimized CSS.
READY-TO-USE CODE:
http://localhost/courses/css/css-fundamentals/mix-group.php
BEST BOOKS TO LEARN CSS:
- CSS: The Definitive Guide: Visual Presentation for the Web by O'Reilly Media. https://amzn.to/2VOWHQT
- HTML and CSS: Design and Build Websites by John Wiley & Sons. https://amzn.to/2Ir5y3i
- CSS: The Missing Manual by O'Reilly Media. https://amzn.to/2ImdyTf
- CSS Visual Dictionary by Independently published. https://amzn.to/2xgwHUh
10- Learn CSS Fundamentals / Pseudo-elementsIn a Rocket
Learn CSS fundamentals really fast, online and free.
FULL COURSE: http://inarocket.com
Learn front end development fast, step-by-step and with ready-to-use code.
IN THIS MODULE YOU'LL LEARN:
- Pseudo-elements as a way to refer to content that does not exist in the source document.
- How to style the first letter or line of a text.
- How to use CSS to generate content before/after an element’s content.
READY-TO-USE CODE:
https://inarocket.com/courses/css/css-fundamentals/pseudo-elements.php
BEST BOOKS TO LEARN CSS:
- CSS: The Definitive Guide: Visual Presentation for the Web by O'Reilly Media. https://amzn.to/2VOWHQT
- HTML and CSS: Design and Build Websites by John Wiley & Sons. https://amzn.to/2Ir5y3i
- CSS: The Missing Manual by O'Reilly Media. https://amzn.to/2ImdyTf
- CSS Visual Dictionary by Independently published. https://amzn.to/2xgwHUh
11- Learn CSS Fundamentals / CombinatorsIn a Rocket
Learn CSS fundamentals really fast, online and free.
FULL COURSE: http://inarocket.com
Learn front end development fast, step-by-step and with ready-to-use code.
IN THIS MODULE YOU'LL LEARN:
- Different combinator selectors that can be used in CSS.
- How to use descendant, child and siblings combinators.
READY-TO-USE CODE:
https://inarocket.com/courses/css/css-fundamentals/combinators.php
BEST BOOKS TO LEARN CSS:
- CSS: The Definitive Guide: Visual Presentation for the Web by O'Reilly Media. https://amzn.to/2VOWHQT
- HTML and CSS: Design and Build Websites by John Wiley & Sons. https://amzn.to/2Ir5y3i
- CSS: The Missing Manual by O'Reilly Media. https://amzn.to/2ImdyTf
- CSS Visual Dictionary by Independently published. https://amzn.to/2xgwHUh
13- Learn CSS Fundamentals / SpecificityIn a Rocket
Learn CSS fundamentals really fast, online and free.
FULL COURSE: http://inarocket.com
Learn front end development fast, step-by-step and with ready-to-use code.
IN THIS MODULE YOU'LL LEARN:
- How specificity works for different kind of selectors.
- How to create selectors avoiding specificity issues and conflicts.
READY-TO-USE CODE:
https://inarocket.com/courses/css/css-fundamentals/specificity.php
BEST BOOKS TO LEARN CSS:
- CSS: The Definitive Guide: Visual Presentation for the Web by O'Reilly Media. https://amzn.to/2VOWHQT
- HTML and CSS: Design and Build Websites by John Wiley & Sons. https://amzn.to/2Ir5y3i
- CSS: The Missing Manual by O'Reilly Media. https://amzn.to/2ImdyTf
- CSS Visual Dictionary by Independently published. https://amzn.to/2xgwHUh
The document discusses the history and evolution of CSS (Cascading Style Sheets). It explains that CSS1 was introduced in 1996 and offered basic formatting capabilities. CSS2 was released in 1998 and introduced additional features like positioning. CSS3 has been divided into modules since work began on it in 1999, with each module adding new capabilities or extending CSS2 features while maintaining backward compatibility. The document then discusses some important CSS3 modules and the browser support for CSS3.
This document provides an overview of an introductory workshop on building a website with HTML/CSS. The workshop was held by Thinkful, an online bootcamp, and was led by an instructor with assistance from TAs.
The agenda included introducing key HTML and CSS concepts, reviewing starter code, building individual websites with support from instructors, and discussing next steps for continuing to learn. Attendees worked on their own websites after the concepts were explained. Real-world examples and troubleshooting using online resources like Google were emphasized. Support from instructors and encouragement to ask questions were provided throughout.
The document discusses various topics related to HTML, CSS, and client-side coding including: CSS selectors, properties, cascade, media queries, animations. It covers CSS syntax, selectors like type, ID, class, attribute, and pseudo selectors. It describes the box model and properties for text, background, positioning. It also explains cascade, specificity, inheritance in CSS and how media queries allow styling for different devices.
Introduction to Html5, css, Javascript and Jqueryvaluebound
To customize the look and feel of a web page, it is absolutely necessary to understand what is HTML, why CSS, and what are Javascript and Jquery. Javascript and Jquery help in interactive frontend development.
Learn CSS fundamentals really fast, online and free.
FULL COURSE: http://inarocket.com
Learn front end development fast, step-by-step and with ready-to-use code.
IN THIS MODULE YOU'LL LEARN:
- How to use the color property to set the foreground color of an element's text content, and its decorations.
- Methods to apply colors in CSS: named colors, HEX, RGB/RGBA and HSL/HSLA.
- Color tools: CSS Peeper, color converter, material design palette, etc.
READY-TO-USE CODE:
https://inarocket.com/courses/css/css-fundamentals/color.php
REFERENCES:
- The color CSS property by MDN. https://developer.mozilla.org/en-US/docs/Web/CSS/color
- Game: What the Hex? http://yizzle.com/whatthehex/
- CSS Peeper: Inspect styles in a simple and well-organized way. https://csspeeper.com/
- RapidTables Color Conversion. https://www.rapidtables.com/convert/color/index.html
- Impalette: Scan images for dominant pantone colors. https://www.impalette.com/
- Material Design Palette. https://www.materialpalette.com/
- Brands in colours: Brands colour reference. https://loriskumo.github.io/Brands-In-Colours/
- BrandColors: Collection of official brand color codes. https://brandcolors.net/
BEST BOOKS TO LEARN CSS:
- CSS: The Definitive Guide: Visual Presentation for the Web by O'Reilly Media. https://amzn.to/2VOWHQT
- HTML and CSS: Design and Build Websites by John Wiley & Sons. https://amzn.to/2Ir5y3i
- CSS: The Missing Manual by O'Reilly Media. https://amzn.to/2ImdyTf
- CSS Visual Dictionary by Independently published. https://amzn.to/2xgwHUh
This presentation is about the types of selectors used in coding/writing HTML or something like that. So this presentation includes element type selector, grouped selector, descendant selector, ID and class selector, universal selector, and pseudoclass selectors. This ppt would provide definition and examples for the topics stated.
This document discusses various types of CSS selectors including universal, element type, class, ID, pseudo-element, and pseudo-class selectors. It also covers CSS properties like positioning, scaling, the box model, and display types. Key points include the different types of positioning like normal, relative, absolute, and float. The document provides examples of how to apply these selectors and properties in CSS code.
The document provides an overview of an introductory HTML and CSS class. It outlines the agenda which includes learning key concepts of HTML and CSS, going over assignments, and completing challenges with support. The instructor introduces themselves and assistants and asks attendees to introduce themselves. It then covers basic concepts like how the web works, the roles of clients and servers, and an example using Facebook. It dives into explanations of HTML, CSS, common tags and elements, and how CSS can be used to style HTML. The document emphasizes using Google to research solutions and finds the assignments are located online.
Intro to HTML and CSS - Class 2 SlidesHeather Rock
1. CSS stands for Cascading Style Sheets and refers to how styles are applied hierarchically to HTML elements.
2. There are three main ways to attach CSS to a webpage: inline, embedded, and linked. Linked style sheets keep the styles in a separate .css file for easy maintenance.
3. CSS selectors allow targeting specific elements by HTML tag names, classes, IDs, and other attributes. Common selectors include colors, fonts, links, and compound selectors.
Cascading Style Sheets (CSS) is a language for styling web pages that allows control over color, layout, and fonts. CSS saves time by reusing style sheets across pages and improves page loading speeds. Styles can be easily maintained and updated globally. CSS offers selectors for styling elements, classes, IDs, and combinations. Pseudo-classes and pseudo-elements allow additional styling options. Media queries allow custom styling for different screen sizes.
CSS (Cascading Style Sheets) contains rules for presenting HTML content. It separates presentation from HTML markup. CSS allows for multiple browsers to display web pages similarly and simplifies web page design modifications. CSS rules have weights that determine which take precedence when multiple rules apply. CSS selectors target elements using tags, classes, IDs and other attributes to style them. Common CSS properties control color, font, size, spacing and positioning.
The document discusses various techniques for writing professional CSS, including:
- CSS allows for rich styling and separates presentation from structure.
- Basic CSS rules include using selectors to style elements, grouping styles, and inheritance.
- More advanced selectors include class, ID, attribute, and pseudo-class selectors.
- The cascade, inheritance, and specificity determine which styles take precedence.
- Proper use of CSS structure, selectors, and rules allows for clean separation of concerns and maintainable styling.
This document provides an introduction to HTML and CSS for crafting webpages. It discusses basic HTML elements like headings, paragraphs, images and links. It explains how HTML pages work with doctypes, tags and content. It also covers CSS for styling HTML with rules, selectors, declarations and properties. Recommended tools include a text editor, browser developer tools, and resources like Mozilla Developer Network and CSS Tricks.
Tim Berners-Lee imagined the World Wide Web as a space for interconnecting documents through hyperlinks. He created HTML to provide the structure and formatting for documents, CSS for presentation, and JavaScript for interactivity. These three languages work together to display content on the web. HTML uses tags to mark up content like paragraphs, headings, and images. CSS controls how content is styled and presented using selectors, rules and property-value pairs. It can be linked via external stylesheets, embedded in HTML, or used inline. JavaScript adds interactive behaviors to webpages.
Learn CSS fundamentals really fast, online and free.
FULL COURSE: http://inarocket.com
Learn front end development fast, step-by-step and with ready-to-use code.
IN THIS MODULE YOU'LL LEARN:
- Any HTML element can be a flex container. Child elements of that container are considered flex items.
- A flex container can be displayed as a block (display: flex) or inline (display: inline-flex).
- By default, flex items width and height are defined by their content.
READY-TO-USE CODE:
http://inarocket.com/courses/css/css-flexbox-cssgrid/flexbox-container-items.php
BEST BOOKS TO LEARN FLEXBOX & CSS GRID:
- The New CSS Layout by A Book Apart. https://amzn.to/2ThK0f7
- Flexbox in CSS by O'Reilly Media. https://amzn.to/2Zfekeg
- Grid Layout in CSS: Interface Layout for the Web by O'Reilly Media. https://amzn.to/36fmIMf
- CSS Grid Layout: 5 Practical Projects by SitePoint. https://amzn.to/3bFWYd3
Learn CSS fundamentals really fast, online and free.
FULL COURSE: http://inarocket.com
Learn front end development fast, step-by-step and with ready-to-use code.
IN THIS MODULE YOU'LL LEARN:
- We no longer talk about CSS 3 or 4. CSS has now more than 80 specifications that evolve independently.
- Where to find all CSS specifications.
- How to check maturity of specifications by status code.
- Where to follow CSS current work.
- Where to find Flexbox and CSS Grid specifications.
- How to check Flexbox and CSS Grid browser support.
READY-TO-USE CODE:
http://inarocket.com/courses/css/css-flexbox-cssgrid/context.php
BEST BOOKS TO LEARN FLEXBOX & CSS GRID:
- The New CSS Layout by A Book Apart. https://amzn.to/2ThK0f7
- Flexbox in CSS by O'Reilly Media. https://amzn.to/2Zfekeg
- Grid Layout in CSS: Interface Layout for the Web by O'Reilly Media. https://amzn.to/36fmIMf
- CSS Grid Layout: 5 Practical Projects by SitePoint. https://amzn.to/3bFWYd3
The document discusses setting up a development environment for learning CSS Flexbox and Grid layouts. It recommends using Visual Studio Code as the text editor and Google Chrome as the browser, which both have tools for inspecting Flexbox and Grid layouts. It provides instructions for installing all required software on Windows using Chocolatey or on MacOS using Homebrew, including downloading Chrome, Firefox, and VS Code.
This document discusses different units used in CSS including absolute and relative units. Absolute units like pixels and points set fixed sizes, while relative units scale with parent elements. Examples show how percentages, ems, rems, viewport units like vw and vh, and font-based units like vmin and vmax scale elements relative to different contexts. The document recommends choosing relative units when elements need to scale with viewport changes. It also promotes understanding units to build flexible and responsive designs.
16- Learn CSS Fundamentals / BackgroundIn a Rocket
Learn CSS fundamentals really fast, online and free.
FULL COURSE: http://inarocket.com
Learn front end development fast, step-by-step and with ready-to-use code.
IN THIS MODULE YOU'LL LEARN:
- How to set a background using CSS.
- How to apply different background options: background-color, background-position, background-image, background-repeat and background-attachment.
- How to create linear and radial gradients.
- Tools: examine background and accessibility information, CSS gradients gallery, etc.
READY-TO-USE CODE:
https://inarocket.com/courses/css/css-fundamentals/background.php
REFERENCES:
- The background CSS property by MDN. https://developer.mozilla.org/en-US/docs/Web/CSS/background
- Chrome Developer Tools: Contrast ratio in the Color Picker. https://developers.google.com/web/updates/2018/01/devtools#contrast
- Enhanced recommended contrast ratio (AAA) by W3C. https://www.w3.org/TR/WCAG21/#contrast-enhanced
- Minimum recommended contrast ratio (AA) by W3C. https://www.w3.org/TR/WCAG21/#contrast-minimum
- Gradient Magic: 28 collections and over 1558 unique CSS gradients. https://www.gradientmagic.com/
- WebGradients: free collection of 180 linear gradients. https://webgradients.com/
BEST BOOKS TO LEARN CSS:
- CSS: The Definitive Guide: Visual Presentation for the Web by O'Reilly Media. https://amzn.to/2VOWHQT
- HTML and CSS: Design and Build Websites by John Wiley & Sons. https://amzn.to/2Ir5y3i
- CSS: The Missing Manual by O'Reilly Media. https://amzn.to/2ImdyTf
- CSS Visual Dictionary by Independently published. https://amzn.to/2xgwHUh
14- Learn CSS Fundamentals / InheritanceIn a Rocket
Learn CSS fundamentals really fast, online and free.
FULL COURSE: http://inarocket.com
Learn front end development fast, step-by-step and with ready-to-use code.
IN THIS MODULE YOU'LL LEARN:
- How some properties on a selector are inherited by all the children of that selector.
- List of properties that inherit.
- How to override inherited values and prevent inheritance in CSS.
- How to reset a property to its inherited or initial value.
READY-TO-USE CODE:
https://inarocket.com/courses/css/css-fundamentals/inheritance.php
BEST BOOKS TO LEARN CSS:
- CSS: The Definitive Guide: Visual Presentation for the Web by O'Reilly Media. https://amzn.to/2VOWHQT
- HTML and CSS: Design and Build Websites by John Wiley & Sons. https://amzn.to/2Ir5y3i
- CSS: The Missing Manual by O'Reilly Media. https://amzn.to/2ImdyTf
- CSS Visual Dictionary by Independently published. https://amzn.to/2xgwHUh
8- Learn CSS Fundamentals / Attribute selectorsIn a Rocket
Learn CSS fundamentals really fast, online and free.
FULL COURSE: http://inarocket.com
Learn front end development fast, step-by-step and with ready-to-use code.
IN THIS MODULE YOU'LL LEARN:
- How to use attribute presence and value selectors.
- How to apply substring matching attribute selectors.
READY-TO-USE CODE:
http://inarocket.com/courses/css/css-fundamentals/selectors-attribute.php
BEST BOOKS TO LEARN CSS:
- CSS: The Definitive Guide: Visual Presentation for the Web by O'Reilly Media. https://amzn.to/2VOWHQT
- HTML and CSS: Design and Build Websites by John Wiley & Sons. https://amzn.to/2Ir5y3i
- CSS: The Missing Manual by O'Reilly Media. https://amzn.to/2ImdyTf
- CSS Visual Dictionary by Independently published. https://amzn.to/2xgwHUh
2- Learn HTML Fundamentals / Text FormattingIn a Rocket
Learn HTML5 fundamentals really fast, online and free.
FULL COURSE: http://inarocket.com
Learn front end development fast, step-by-step and with ready-to-use code.
IN THIS MODULE YOU'LL LEARN:
- How to structure your content with headers.
- How to organize your ideas with paragraphs.
- How to force spaces and preformat text.
- How to format quotes with blockquote.
- How to tag relevant content with mark.
- How to create ordered, unordered and description lists.
- How to show/hide additional content with details.
- How to document your code with comments.
- How to display reserved and invisible characters with HTML entities.
1- Learn HTML Fundamentals / Start in 5 MinutesIn a Rocket
Learn HTML5 fundamentals really fast, online and free.
FULL COURSE: http://inarocket.com
Learn front end development fast, step-by-step and with ready-to-use code.
IN THIS MODULE YOU'LL LEARN:
- What is HTML.
- Why HTML is a markup language.
- How is its basic structure.
- How to create your first HTML in 5 minutes.
http://inarocket.com
Learn SUIT fundamentals as fast as possible. What is SUIT (Components, descendents, modifiers, states, and utilities), SUIT syntax, how it works with a real example, etc.
http://inarocket.com
Learn BEM fundamentals as fast as possible. What is BEM (Block, element, modifier), BEM syntax, how it works with a real example, etc.
文凭(UMA毕业证书)马拉加大学毕业证成绩单制作案例【q微1954292140】马拉加大学offer/学位证、留信官方学历认证(永久存档真实可查)采用学校原版纸张、特殊工艺完全按照原版一比一制作【q微1954292140】Buy Universidad de Málaga Diploma购买美国毕业证,购买英国毕业证,购买澳洲毕业证,购买加拿大毕业证,以及德国毕业证,购买法国毕业证(q微1954292140)购买荷兰毕业证、购买瑞士毕业证、购买日本毕业证、购买韩国毕业证、购买新西兰毕业证、购买新加坡毕业证、购买西班牙毕业证、购买马来西亚毕业证等。包括了本科毕业证,硕士毕业证。
【办理马拉加大学成绩单Buy Universidad de Málaga Transcripts】
购买日韩成绩单、英国大学成绩单、美国大学成绩单、澳洲大学成绩单、加拿大大学成绩单(q微1954292140)新加坡大学成绩单、新西兰大学成绩单、爱尔兰成绩单、西班牙成绩单、德国成绩单。成绩单的意义主要体现在证明学习能力、评估学术背景、展示综合素质、提高录取率,以及是作为留信认证申请材料的一部分。
马拉加大学成绩单能够体现您的的学习能力,包括马拉加大学课程成绩、专业能力、研究能力。(q微1954292140)具体来说,成绩报告单通常包含学生的学习技能与习惯、各科成绩以及老师评语等部分,因此,成绩单不仅是学生学术能力的证明,也是评估学生是否适合某个教育项目的重要依据!
Buy Universidad de Málaga Diploma《正式成绩单论文没过》有文凭却得不到认证。又该怎么办???西班牙毕业证购买,西班牙文凭购买,【q微1954292140】西班牙文凭购买,西班牙文凭定制,西班牙文凭补办。专业在线定制西班牙大学文凭,定做西班牙本科文凭,【q微1954292140】复制西班牙Universidad de Málaga completion letter。在线快速补办西班牙本科毕业证、硕士文凭证书,购买西班牙学位证、马拉加大学Offer,西班牙大学文凭在线购买。
特殊原因导致无法毕业,也可以联系我们帮您办理相关材料:
1:在马拉加大学挂科了,不想读了,成绩不理想怎么办?
2:打算回国了,找工作的时候,需要提供认证《UMA成绩单购买办理马拉加大学毕业证书范本》
购买日韩毕业证、英国大学毕业证、美国大学毕业证、澳洲大学毕业证、加拿大大学毕业证(q微1954292140)新加坡大学毕业证、新西兰大学毕业证、爱尔兰毕业证、西班牙毕业证、德国毕业证,回国证明,留信网认证,留信认证办理,学历认证。从而完成就业。马拉加大学毕业证办理,马拉加大学文凭办理,马拉加大学成绩单办理和真实留信认证、留服认证、马拉加大学学历认证。学院文凭定制,马拉加大学原版文凭补办,成绩单详解细节,扫描件文凭定做,100%文凭复刻。
主营项目:
1、真实教育部国外学历学位认证《西班牙毕业文凭证书快速办理马拉加大学学位证和毕业证的区别》【q微1954292140】《论文没过马拉加大学正式成绩单》,教育部存档,教育部留服网站100%可查.
2、办理UMA毕业证,改成绩单《UMA毕业证明办理马拉加大学学历认证失败怎么办》【Q/WeChat:1954292140】Buy Universidad de Málaga Certificates《正式成绩单论文没过》,马拉加大学Offer、在读证明、学生卡、信封、证明信等全套材料,从防伪到印刷,从水印到钢印烫金,高精仿度跟学校原版100%相同.
3、真实使馆认证(即留学人员回国证明),使馆存档可通过大使馆查询确认.
4、留信网认证,国家专业人才认证中心颁发入库证书,留信网存档可查.
西班牙马拉加大学毕业证(UMA毕业证书)UMA文凭【q微1954292140】高仿真还原西班牙文凭证书和外壳,定制西班牙马拉加大学成绩单和信封。学历认证失败怎么办UMA毕业证【q微1954292140】毕业证工艺详解马拉加大学offer/学位证文凭一模一样、留信官方学历认证(永久存档真实可查)采用学校原版纸张、特殊工艺完全按照原版一比一制作。帮你解决马拉加大学学历学位认证难题。
帮您解决在西班牙马拉加大学未毕业难题(Universidad de Málaga)文凭购买、毕业证购买、大学文凭购买、大学毕业证购买、买文凭、日韩文凭、英国大学文凭、美国大学文凭、澳洲大学文凭、加拿大大学文凭(q微1954292140)新加坡大学文凭、新西兰大学文凭、爱尔兰文凭、西班牙文凭、德国文凭、教育部认证,买毕业证,毕业证购买,买大学文凭,【q微1954292140】学位证1:1完美还原海外各大学毕业材料上的工艺:水印,阴影底纹,钢印LOGO烫金烫银,LOGO烫金烫银复合重叠。文字图案浮雕、激光镭射、紫外荧光、温感、复印防伪等防伪工艺。《马拉加大学2025年新版毕业证书西班牙毕业证书办理UMA录取通知书》
Essential Tech Stack for Effective Shopify Dropshipping Integration.pdfCartCoders
Looking to connect AliExpress or other platforms with your Shopify store? Our Shopify Dropshipping Integration service helps automate orders, manage inventory, and improve delivery time. Start syncing your suppliers and scale your dropshipping business.
5 Reasons cheap WordPress hosting is costing you more | Reversed OutReversed Out Creative
Cheap WordPress hosting may seem budget-friendly, but it often comes with hidden costs like poor performance, security risks, and limited support. This article breaks down the true impact of low-cost hosting and why investing wisely can benefit your website in the long run.
Cloud VPS Provider in India: The Best Hosting Solution for Your BusinessDanaJohnson510230
HeroXhost is a leading Cloud VPS provider in India offering powerful hosting solutions with SSD storage, high-speed performance, and 24/7 support. It provides flexible pricing plans suitable for startups, enterprises, and developers.
Follow this step-by-step guide to activate and configure your Frontier Unlimited Internet. Get expert setup tips from a reliable Internet service Provider and responsive Frontier Customer Service.
1. IN A ROCKET
Learn front-end development at rocket speed
CSS CSS FUNDAMENTALS
Pseudo-class
2. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
PSEUDO-CLASSES
With this code all a elements that have not yet been visited are shown in green.
A pseudo-class selects an element with a special state specified by a keyword.
a:link {color: green}
Syntax selector:pseudo-class {style properties}
3. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
TARGET &
LANG
UI ELEMENT
STATES
DYNAMIC
NEGATIONSTRUCTURAL
PSEUDO-CLASSES PSEUDO-CLASSES PSEUDO-CLASSES
PSEUDO-CLASSES PSEUDO-CLASSES
4. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
Dynamic
pseudo-classes
:link
:visited
:hover
:active
:focus
5. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
PSEUDO-CLASSES / DYNAMIC / LINK STATES
Contact
a:link
Represents links that have
not yet been visited.
Contact
a:visited
Styles for links that have been visited
(exists in the browser's history).
Contact
a:active
Triggered when the user clicks the link or
selects it with the keyboard's tab key.
CLICKED
Contact
a:hover
Generally triggered when the user hovers over
an element with the cursor (mouse pointer).
6. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
Dynamic
pseudo-classes
:link
:visited
:hover
:active
:focus
How to remember them?
😍 LOVE
😤 HATE
7. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
PSEUDO-CLASSES / DYNAMIC
With this code all not visited links are shown in green.
Selects all links that have not yet been visited.
a:link {color: green}
Syntax selector:link {style properties}
8. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
PSEUDO-CLASSES / DYNAMIC
<body>
<a href="#">Not visited.</a>
<a href="#">Visited.</a>
<a href="#">Hover.</a>
<a href="#">Active.</a>
<input type="text" name="zip" id="zip">
</body>
a:link { color: blue; }
a:visited { color: purple; }
a:hover { color: green; }
a:active { color: red; }
input:focus { color: orange; }
Web page title
index.html
Not visited.
Pressed
Visited. Hover. Active. Writing here...
READY TO USE CODE
9. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
TARGET &
LANG
UI ELEMENT
STATES
DYNAMIC
NEGATIONSTRUCTURAL
PSEUDO-CLASSES PSEUDO-CLASSES PSEUDO-CLASSES
PSEUDO-CLASSES PSEUDO-CLASSES
10. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
PSEUDO-CLASSES / TARGET & LANG
With this code the terms fragment identifier is shown in green.
Selects a fragment identifier that has a location within a resource.
h2:terms {color: green}
Syntax selector:target {style properties}
11. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
PSEUDO-CLASSES / TARGET & LANG
<body>
<a href="#about">About.</a>
<a href="#terms">Terms.</a>
<h2 id="about">About our company</h2>
<h2 id="terms">Terms of use</h2>
</body>
h2:target { color: green; }
Web page title
index.html
- About.
- Terms.
About our company
Terms of use
READY TO USE CODE
12. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
PSEUDO-CLASSES / TARGET & LANG
With this code the paragraphs in English (en) are shown in green.
Selects elements based on the language they are determined to be in.
p:lang(en) {color: green}
Syntax selector:lang(lg) {style properties}
13. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
PSEUDO-CLASSES / TARGET & LANG
<body>
<p lang="en"><q>To be, or not to be:
that is the question.</q></p>
<p lang="es"><q>En un lugar de la
Mancha, de cuyo nombre no quiero
acordarme...</q></p>
</body>
p:lang(en) > q { quotes: '201C' '201D'; }
p:lang(es) > q { quotes: '«' '»'; }
Web page title
index.html
“To be, or not to be: that is the question.”
«En un lugar de la Mancha, de cuyo nombre no quiero
acordarme...»
READY TO USE CODE
14. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
TARGET &
LANG
UI ELEMENT
STATES
DYNAMIC
NEGATIONSTRUCTURAL
PSEUDO-CLASSES PSEUDO-CLASSES PSEUDO-CLASSES
PSEUDO-CLASSES PSEUDO-CLASSES
15. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
PSEUDO-CLASSES / UI ELEMENT STATES
With this code only the enabled inputs are shown in green.
Selects any enabled element (it can be selected, clicked on, typed into, etc.).
input:enabled {color: green}
Syntax selector:enabled {style properties}
16. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
PSEUDO-CLASSES / UI ELEMENT STATES
With this code only the disabled inputs are shown in green.
Selects any disabled element.
input:disabled {color: green}
Syntax selector:enabled {style properties}
17. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
PSEUDO-CLASSES / UI ELEMENT STATES
<body>
<form>
<label for="name">Name:</label>
<input type="text" id="name">
<label for="city">City:</label>
<input type="text" id="city" value="NYC"
disabled="disabled">
<input type="button" value="Submit">
</form>
</body>
input:enabled { color: green; }
input:disabled { color: gray; }
Web page title
index.html
Name:
City:
John Doe
NYC
READY TO USE CODE
18. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
PSEUDO-CLASSES / UI ELEMENT STATES
With this code only the checked inputs are shown in green.
Selects any radio, checkbox or option that is checked or toggled to an on state.
input:checked {color: green}
Syntax selector:checked {style properties}
19. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
PSEUDO-CLASSES / UI ELEMENT STATES
<body>
<form>
<input type="radio" name="pay" id="cash">
<label for="cash">Cash</label>
<input type="radio" name="pay" id="card">
<label for="card">Card</label>
<input type="checkbox" name="nwslt" id="nwslt">
<label for="nwslt">Subscribe me!</label>
</form>
</body>
input[type=radio]:checked + label { color:
green; }
input[type=checkbox]:checked + label { color:
blue; }
Web page title
index.html
Cash Card Subscribe me!
READY TO USE CODE
20. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
TARGET &
LANG
UI ELEMENT
STATES
DYNAMIC
NEGATIONSTRUCTURAL
PSEUDO-CLASSES PSEUDO-CLASSES PSEUDO-CLASSES
PSEUDO-CLASSES PSEUDO-CLASSES
21. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
Structural
pseudo-classes
:root
:empty
:first-child
:last-child
:nth-child()
:only-child
:first-of-type
:last-of-type
:nth-of-type()
:only-of-type
22. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
PSEUDO-CLASSES / STRUCTURAL
Selects an element that is the root of the document (in HTML, this is always the HTML element).
:root {color: green}
Syntax :root {style properties}
23. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
PSEUDO-CLASSES / STRUCTURAL
<body>
<h2>Lorem ipsum dolor</h2>
<p>Nostrum similique veniam commodi sed esse earum
voluptatum corrupti at quam voluptates?</p>
<ul>
<li>Esse</li>
<li>Earum</li>
</ul>
</body>
:root { color: green; }
Web page title
index.html
Lorem ipsum dolor
Nostrum similique veniam commodi sed esse earum voluptatum
corrupti at quam voluptates?
• Esse
• Earum
READY TO USE CODE
24. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
PSEUDO-CLASSES / STRUCTURAL
<body>
<h2>Lorem ipsum dolor</h2>
<p>Nostrum similique veniam commodi sed esse
earum voluptatum corrupti at quam voluptates?
</p>
</body>
:root {
--color-primary: blue;
--color-secondary: gray;
}
p {
background: var(--color-secondary);
color: var(--color-primary);
}
Web page title
index.html
Lorem ipsum dolor
Nostrum similique veniam commodi sed esse earum voluptatum
corrupti at quam voluptates?
READY TO USE CODE
25. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
Structural
pseudo-classes
:root
:empty
:first-child
:last-child
:nth-child()
:only-child
:first-of-type
:last-of-type
:nth-of-type()
:only-of-type
26. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
PSEUDO-CLASSES / STRUCTURAL
With this code only the empty divs are shown in gray.
Selects an element that has no children at all.
div:empty {background: gray}
Syntax element:empty {style properties}
27. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
PSEUDO-CLASSES / STRUCTURAL
<body>
<article>
<h2>Item 1</h2>
<p>Item description.</p>
</article>
<article><!-- No item here --></article>
</body>
article {
background: green;
width: 100px;
height: 100px;
}
article:empty {
background: gray;
}
Web page title
index.html
Item 1
Item description.
READY TO USE CODE
28. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
Structural
pseudo-classes
:root
:empty
:first-child
:last-child
:nth-child()
:only-child
:first-of-type
:last-of-type
:nth-of-type()
:only-of-type
29. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
PSEUDO-CLASSES / STRUCTURAL
With this code only the first li of a list is shown in green.
Selects an element that is first in a list of siblings.
li:first-child {color: green}
Syntax element:first-child {style properties}
30. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
PSEUDO-CLASSES / STRUCTURAL
<body>
<ol>
<li>Usain Bolt - Gold</li>
<li>Yohan Blake - Silver</li>
<li>Justin Gatlin - Bronze</li>
</ol>
</body>
li:first-child { color: green; }
Web page title
index.html
1. Usain Bolt - Gold
2. Yohan Blake - Silver
3. Justin Gatlin - Bronze
READY TO USE CODE
31. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
Structural
pseudo-classes
:root
:empty
:first-child
:last-child
:nth-child()
:only-child
:first-of-type
:last-of-type
:nth-of-type()
:only-of-type
32. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
PSEUDO-CLASSES / STRUCTURAL
With this code only the last li of a list is shown in green.
Selects an element that is last in a list of siblings.
li:last-child {color: green}
Syntax element:last-child {style properties}
33. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
PSEUDO-CLASSES / STRUCTURAL
<body>
<ol>
<li>Usain Bolt - Gold</li>
<li>Yohan Blake - Silver</li>
<li>Justin Gatlin - Bronze</li>
<li>Miguel Sánchez - Retired ;)</li>
</ol>
</body>
li:last-child { color: green; }
Web page title
index.html
1. Usain Bolt - Gold
2. Yohan Blake - Silver
3. Justin Gatlin - Bronze
4. Miguel Sánchez - Retired ;)
READY TO USE CODE
34. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
Structural
pseudo-classes
:root
:empty
:first-child
:last-child
:nth-child()
:only-child
:first-of-type
:last-of-type
:nth-of-type()
:only-of-type
35. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
PSEUDO-CLASSES / STRUCTURAL
With this code every odd li of a list is shown in green.
Selects an element that has an+b-1 siblings before it in the document tree and has a parent element.
li:nth-child(2n+1) {color: green}
Syntax element:nth-child(an + b) {style properties}
41. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
PSEUDO-CLASSES / STRUCTURAL
li:nth-child(1n+3) { color: green; }
• Item 1
• Item 2
• Item 3
• Item 4
• Item 5
• Item 6
• Item 7
• Item 8
First term
Difference
42. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
PSEUDO-CLASSES / STRUCTURAL
li:nth-child(3n+3) { color: green; }
• Item 1
• Item 2
• Item 3
• Item 4
• Item 5
• Item 6
• Item 7
• Item 8
First term
Difference
43. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
Structural
pseudo-classes
:root
:empty
:first-child
:last-child
:nth-child()
:only-child
:first-of-type
:last-of-type
:nth-of-type()
:only-of-type
44. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
PSEUDO-CLASSES / STRUCTURAL
With this code only an li without siblings is shown in green.
Selects an element that has no siblings.
li:only-child {color: green}
Syntax element:only-child {style properties}
45. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
PSEUDO-CLASSES / STRUCTURAL
<body>
<h2>Search results: devices</h2>
<ul>
<li>Laptops</li>
<li>Smartphones</li>
</ul>
<h2>Search results: accessories</h2>
<ul>
<li>No results found</li>
</ul>
</body>
li:only-child { color: green; }
Web page title
index.html
Search results: devices
• Laptops
• Smartphones
Search results: accessories
• No results found
READY TO USE CODE
46. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
Structural
pseudo-classes
:root
:empty
:first-child
:last-child
:nth-child()
:only-child
:first-of-type
:last-of-type
:nth-of-type()
:only-of-type
47. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
PSEUDO-CLASSES / STRUCTURAL
With this code only the first p in a group of children paragraphs is shown in green.
Selects an element that is the first sibling of its type.
p:first-of-type {color: green}
Syntax element:first-of-type {style properties}
48. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
PSEUDO-CLASSES / STRUCTURAL
<body>
<main>
<h2>Featured product</h2>
<p>Product description.</p>
<h2>Second product</h2>
<p>Product description.</p>
</main>
</body>
p:first-of-type { color: green; }
Web page title
index.html
Featured product
Product description.
Second product
Product description.
READY TO USE CODE
49. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
Structural
pseudo-classes
:root
:empty
:first-child
:last-child
:nth-child()
:only-child
:first-of-type
:last-of-type
:nth-of-type()
:only-of-type
50. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
PSEUDO-CLASSES / STRUCTURAL
With this code only the last p in a group of children paragraphs is shown in green.
Selects an element that is the last sibling of its type.
p:last-of-type {color: green}
Syntax element:first-of-type {style properties}
51. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
PSEUDO-CLASSES / STRUCTURAL
<body>
<main>
<h2>First product</h2>
<p>Product description.</p>
<h2>Expiring product</h2>
<p>Last units available.</p>
</main>
</body>
p:last-of-type { color: green; }
Web page title
index.html
First product
Product description.
Expiring product
Last units available.
READY TO USE CODE
52. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
Structural
pseudo-classes
:root
:empty
:first-child
:last-child
:nth-child()
:only-child
:first-of-type
:last-of-type
:nth-of-type()
:only-of-type
53. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
PSEUDO-CLASSES / STRUCTURAL
With this code only the odd paragraphs in a group of children paragraphs are shown in green.
Selects elements of a given type, based on their position among a group of siblings.
p:nth-of-type(odd) {color: green}
Syntax element:nth-of-type() {style properties}
54. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
PSEUDO-CLASSES / STRUCTURAL
<body>
<main>
<h2>Product 1</h2>
<p>Product description.</p>
<h2>Product 2</h2>
<p>Product description.</p>
<h2>Product 3</h2>
<p>Product description.</p>
<h2>Product 4</h2>
<p>Product description.</p>
</main>
</body>
p:nth-of-type(odd) { color: green; }
Web page title
index.html
Product 1
Product description.
Product 2
Product description.
Product 3
Product description.
Product 4
Product description.
READY TO USE CODE
55. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
Structural
pseudo-classes
:root
:empty
:first-child
:last-child
:nth-child()
:only-child
:first-of-type
:last-of-type
:nth-of-type()
:only-of-type
56. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
PSEUDO-CLASSES / STRUCTURAL
With this code only the paragraph with no other siblign paragraphs is shown in green.
Selects an element that has no siblings with the same expanded element name.
p:only-of-type {color: green}
Syntax element:only-of-type() {style properties}
57. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
PSEUDO-CLASSES / STRUCTURAL
<body>
<article>
<h2>Product 1</h2>
<p>Product description.</p>
<p>Description continues here.</p>
</article>
<article>
<h2>Product 2</h2>
<p>Out of stock.</p>
</article>
</body>
p:only-of-type { color: green; }
Web page title
index.html
Product 1
Product description.
Description continues here.
Product 2
Out of stock.
READY TO USE CODE
58. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
TARGET &
LANG
UI ELEMENT
STATES
DYNAMIC
NEGATIONSTRUCTURAL
PSEUDO-CLASSES PSEUDO-CLASSES PSEUDO-CLASSES
PSEUDO-CLASSES PSEUDO-CLASSES
59. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
PSEUDO-CLASSES / NEGATION
With this code all the elements of a header are shown in green, excluding all h1 headers.
Selects elements that do not match a list of selectors.
header :not(h1) {color: green}
Syntax element:not(X) {style properties}
60. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
PSEUDO-CLASSES / NEGATION
<body>
<header>
<h1>Company name</h1>
<h1>Tagline</h1>
<nav>Navigation goes here.</nav>
<div>User not logged in.</div>
</header>
</body>
header :not(h1) { color: green; }
Web page title
index.html
Company name
Tagline
Product description.
User not logged in.
READY TO USE CODE
61. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
HTML CSS
Browser
PSEUDO-CLASSES / NEGATION
<body>
<p class="mini">Paragraph goes here.</p>
<p>Paragraph goes here.</p>
<p class="mini">Paragraph goes here.</p>
</body>
.mini { color: black; }
p:not(.mini) { color: green; }
Web page title
index.html
Paragraph goes here.
Paragraph goes here.
Paragraph goes here.
READY TO USE CODE
62. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
TARGET &
LANG
UI ELEMENT
STATES
DYNAMIC
NEGATIONSTRUCTURAL
PSEUDO-CLASSES PSEUDO-CLASSES PSEUDO-CLASSES
PSEUDO-CLASSES PSEUDO-CLASSES
63. CSS FUNDAMENTALS: Build a strong foundation by solving real cases inarocket.com
REFERENCE: W3C
SOURCE: Selectors Level 3 by W3C.
64. Learn front-end development at rocket speed
inarocket.com
by miguelsanchez.com
YOU CAN CONTINUE THIS COURSE FOR FREE ON
+ READY TO USE CODE
+ QUIZZES
+ FREE UPDATES
65. We respect your time
No more blah blah videos. Just straight to
the point slides with relevant information.
Ready to use code
Real code you can just copy and paste into
your real projects.
Step by step guides
Clear and concise steps to build real use
solutions. No missed points.
Learn front-end development at rocket speed
inarocket.com
66. IN A ROCKET
Learn front-end development at rocket speed
CSS CSS FUNDAMENTALS
Pseudo-class