bugl
bugl
HomeLearnPatternsPathsSearch
HomeLearnPatternsPathsSearch

Loading lesson path

Learn/CSS

CSS

CSS Foundations

Selectors, the cascade, layout basics, spacing, typography, and the core styling model.

Lesson 1

CSS Tutorial

CSS is the language we use to style an HTML document.

Read lesson →Loading…
Lesson 2

CSS Introduction

CSS is the language we use to style a Web page.

Read lesson →Loading…
Lesson 3

CSS Syntax

A CSS rule consists of a selector and a declaration block:

Read lesson →Loading…
Lesson 4

CSS Selectors

CSS selectors are used to "find" (or select) the HTML elements you want to style.

Read lesson →Loading…
Lesson 5

CSS Grouping Selectors

The universal selector (*) selects all HTML elements on the page.

Read lesson →Loading…
Lesson 6

How To Add CSS

When a browser reads a style sheet, it will format the HTML document according to the information in the style sheet.

Read lesson →Loading…
Lesson 7

How To Add Internal CSS

An internal style sheet may be used if one single HTML page has a unique style.

Read lesson →Loading…
Lesson 8

How To Add Inline CSS

An inline style may be used to apply a unique style for a single element.

Read lesson →Loading…
Lesson 9

Multiple Style Sheets & Cascading Order

If some properties have been defined for the same selector (element) in different style sheets, the value from the last read style sheet will be used.

Read lesson →Loading…
Lesson 10

CSS Comments

Comments are used to explain the CSS code, and may help when you edit the source code at a later date.

Read lesson →Loading…
Lesson 11

CSS Errors

Errors in CSS can lead to unexpected behavior or styles not being applied correctly.

Read lesson →Loading…
Lesson 12

CSS Colors

In CSS, colors are specified by using a predefined color name, or with a RGB, HEX, HSL, RGBA, HSLA value.

Read lesson →Loading…
Lesson 13

CSS RGB Colors

An RGB color value represents RED, GREEN, and BLUE light sources.

Read lesson →Loading…
Lesson 14

CSS HEX Colors

A hexadecimal color is specified with: #RRGGBB.

Read lesson →Loading…
Lesson 15

CSS HSL Colors

HSL stands for hue, saturation, and lightness.

Read lesson →Loading…
Lesson 16

CSS Backgrounds

The CSS background properties are used to add background effects for elements.

Read lesson →Loading…
Lesson 17

CSS Background Image

The background-image property specifies an image to use as the background of an element.

Read lesson →Loading…
Lesson 18

CSS Background Image Repeat

The background-repeat property sets if/how a background image will be repeated.

Read lesson →Loading…
Lesson 19

CSS Background Attachment

The background-attachment property specifies whether the background image should scroll or be fixed (will not scroll with the rest of the page):

Read lesson →Loading…
Lesson 20

CSS Background Shorthand

To shorten the code, it is possible to specify all the background properties in one single property. This is called a shorthand property.

Read lesson →Loading…
Lesson 21

CSS Borders

The CSS border properties allow you to specify the style, width, and color of an element's border.

Read lesson →Loading…
Lesson 22

CSS Border Width

The border-width property specifies the width of the four borders.

Read lesson →Loading…
Lesson 23

CSS Border Color

The border-color property is used to set the color of the four borders.

Read lesson →Loading…
Lesson 24

CSS Shorthand Border Property

Like you saw in the earlier lesson, there are many properties to consider when dealing with borders.

Read lesson →Loading…
Lesson 25

CSS Rounded Borders

The border-radius property is used to add rounded borders to an element:

Read lesson →Loading…
Lesson 26

CSS Margins

The CSS margin properties are used to create space around elements, outside of any defined borders.

Read lesson →Loading…
Lesson 27

CSS Margin Collapse

Margin collapse is when two margins collapse into a single margin.

Read lesson →Loading…
Lesson 28

CSS Padding

The CSS padding properties are used to generate space around an element's content, inside of any defined borders.

Read lesson →Loading…
Lesson 29

CSS Padding and box-sizing

The CSS width property specifies the width of the element's content area. The content area is the portion inside the padding, border, and margin of an element ( the box model ).

Read lesson →Loading…
Lesson 30

CSS Height and Width

The CSS height and width properties are used to set the height and width of an element.

Read lesson →Loading…
Lesson 31

CSS Min/Max Height and Width

The min-width and max-width properties are used to set the minimum and maximum width of an element.

Read lesson →Loading…
Lesson 32

CSS Box Model

In CSS, the term "box model" is used when talking about web design and layout.

Read lesson →Loading…
Lesson 33

CSS Outline

An outline is a line that is drawn around elements, OUTSIDE the borders, to make the element "stand out".

Read lesson →Loading…
Lesson 34

CSS Outline Width

The outline-width property specifies the width of the outline, and can have one of the following values:

Read lesson →Loading…
Lesson 35

CSS Outline Color

The outline-color property is used to set the color of the outline.

Read lesson →Loading…
Lesson 36

CSS Outline Shorthand

The outline property is a shorthand property for setting the following individual outline properties:

Read lesson →Loading…
Lesson 37

CSS Outline Offset

The outline-offset property adds a space between an outline and the edge/border of an element. The space between an element and its outline is transparent.

Read lesson →Loading…
Lesson 38

CSS Text Color

CSS has a lot of properties for styling and formatting text.

Read lesson →Loading…
Lesson 39

CSS Text Alignment

- text-align - text-align-last - vertical-align - direction - unicode-bidi

Read lesson →Loading…
Lesson 40

CSS Text Decoration

The CSS text-decoration property is used to control the appearance of decorative lines on text.

Read lesson →Loading…
Lesson 41

CSS Text Decoration Styles

The CSS text-decoration-style property sets the style of the decoration line.

Read lesson →Loading…
Lesson 42

CSS Text Transformation

The CSS text-transform property is used to control the capitalization of text in an element.

Read lesson →Loading…
Lesson 43

CSS Text Spacing

CSS has several properties to control text spacing.

Read lesson →Loading…
Lesson 44

CSS Text Shadow

The text-shadow property adds shadow to text.

Read lesson →Loading…
Lesson 45

CSS Web Safe Fonts

Web safe fonts are fonts that are universally installed across all browsers and devices.

Read lesson →Loading…
Lesson 46

CSS Font Fallbacks

Below are some commonly used font fallbacks, organized by the 5 generic font families:

Read lesson →Loading…
Lesson 47

CSS Font Style

The CSS font-style property specifies the font style for a text..

Read lesson →Loading…
Lesson 48

CSS Font Size

The CSS font-size property is used to specify the size of the text/font.

Read lesson →Loading…
Lesson 49

CSS Google Fonts

If you do not want to use any of the standard fonts in HTML, you can use Google Fonts.

Read lesson →Loading…
Lesson 50

CSS Great Font Pairings

Great font pairings are essential to great design!

Read lesson →Loading…
Lesson 51

CSS Font Property

To shorten the code, it is possible to specify all the individual font properties in one declaration.

Read lesson →Loading…
Lesson 52

CSS Icons - Font Awesome

Icons can easily be added to your HTML page, by using an icon library.

Read lesson →Loading…
Lesson 53

CSS Icons - Bootstrap

To use the Bootstrap glyphicons, add the following line inside the <head> section of your HTML page:

Read lesson →Loading…
Lesson 54

CSS Icons - Google

To use the Google icons, add the following line inside the <head> section of your HTML page:

Read lesson →Loading…
Lesson 55

CSS Links

HTML links can be styled with many CSS properties, like color , text-decoration , background-color , font-size , font-weight , font-family , etc.).

Read lesson →Loading…
Lesson 56

CSS Link Buttons

CSS can be used to create HTML link buttons:

Read lesson →Loading…
Lesson 57

CSS Lists

In HTML, there are two main types of lists:

Read lesson →Loading…
Lesson 58

CSS Tables

HTML tables can be greatly improved with CSS:

Read lesson →Loading…
Lesson 59

CSS Table Size (Width and Height)

The CSS width property is used to set the width of a table.

Read lesson →Loading…
Lesson 60

CSS Table Alignment

The CSS text-align property is used to set the horizontal alignment of the content in <th> or <td>.

Read lesson →Loading…
Lesson 61

CSS Table Styling

To add some more space between the inner borders and the content in a table, use the padding property on <td> and <th> elements:

Read lesson →Loading…
Lesson 62

CSS Responsive Tables

A responsive table will display a horizontal scrollbar if the screen is too small to display the full content.

Read lesson →Loading…
Lesson 63

CSS The display Property

The display property is an important CSS property for controlling layout. It specifies whether an HTML element is treated as a block or an inline element.

Read lesson →Loading…
Lesson 64

CSS Hide Elements

When using display: none; the element is completely hidden from the document flow and does not take up any space.

Read lesson →Loading…
Lesson 65

CSS The max-width Property

The max-width property defines the maximum width of an element.

Read lesson →Loading…
Lesson 66

CSS The position Property

CSS positioning is about controlling the placement of elements within a web page.

Read lesson →Loading…
Lesson 67

CSS Fixed and Absolute Positioning

An element with position: fixed; is positioned relative to the viewport, which means it always stays in the same place even if the page is scrolled. The top, right, bottom, and left properties are us…

Read lesson →Loading…
Lesson 68

CSS Sticky Positioning

An element with position: sticky; toggles between a relative and fixed position, depending on the scroll position.

Read lesson →Loading…
Lesson 69

CSS Position Offsets

The top , right , bottom , and left properties are used to position elements.

Read lesson →Loading…
Lesson 70

CSS The z-index Property

The z-index property specifies the stack order of positioned elements.

Read lesson →Loading…
Lesson 71

CSS The overflow Property

The CSS overflow property controls what happens to content that is too big to fit into an area.

Read lesson →Loading…
Lesson 72

CSS overflow-x and overflow-y

The overflow-x and overflow-y properties allow you to control overflow behavior independently for horizontal and vertical directions.

Read lesson →Loading…
Lesson 73

CSS Float

The float property specifies how an element should float within its container.

Read lesson →Loading…
Lesson 74

CSS clear and Clearfix Hack

The clear property specifies what should happen with the element that is NEXT to a floating element.

Read lesson →Loading…
Lesson 75

CSS display: inline-block

The display: inline-block property combines the features of both inline and block elements.

Read lesson →Loading…
Lesson 76

CSS Center Align

With CSS, you can center elements (horizontally, vertically, or both) with several methods, depending on the type of element.

Read lesson →Loading…
Lesson 77

CSS Horizontal Align

There are several ways to horizontally center elements in CSS, depending on the type of element.

Read lesson →Loading…
Lesson 78

CSS Vertical Align

Vertical centering in CSS can be achieved using modern layout techniques like Flexbox and Grid, or using positioning with transforms.

Read lesson →Loading…
Lesson 79

CSS Combinators

A combinator is something that defines the relationship between two or more selectors.

Read lesson →Loading…
Lesson 80

CSS Pseudo-classes

A CSS pseudo-class is a keyword that can be added to a selector, to define a style for a special state of an element.

Read lesson →Loading…
Lesson 81

CSS Interactive Pseudo-classes

Interactive pseudo-classes apply styles based on user interaction with elements.

Read lesson →Loading…
Lesson 82

CSS Structural Pseudo-classes

Structural pseudo-classes select elements based on their position in the document tree.

Read lesson →Loading…
Lesson 83

CSS Pseudo-elements

A CSS pseudo-element is a keyword that can be added to a selector, to style a specific part of an element.

Read lesson →Loading…
Lesson 84

CSS Pseudo-elements for Text

Pseudo-elements for text, allow you to style specific parts of text content, such as the first line or first letter.

Read lesson →Loading…
Lesson 85

CSS Pseudo-elements for Content

Pseudo-elements for content allow you to insert content before or after elements, style list markers, and more.

Read lesson →Loading…
Lesson 86

CSS Opacity

The opacity property specifies the opacity/transparency of an element.

Read lesson →Loading…
Lesson 87

CSS Navigation Bars

A navigation bar is an important component of web design.

Read lesson →Loading…
Lesson 88

CSS Vertical Navigation Bar

In a vertical navigation bar, the navigation links are stacked vertically (on top of each other), and is typically aligned along the left or right side of a webpage.

Read lesson →Loading…
Lesson 89

CSS Horizontal Navigation Bar

In a horizontal navigation bar, the navigation links are stacked horizontally (next to each other), and is typically aligned on the top of a webpage.

Read lesson →Loading…
Lesson 90

CSS Dropdowns

CSS dropdowns are used to display a list of options or content when a user clicks or hover over an element, like a button or a navigation link.

Read lesson →Loading…
Lesson 91

CSS Advanced Dropdowns

How to add an image and other content inside the dropdown box.

Read lesson →Loading…
Lesson 92

CSS Image Gallery

A CSS image gallery is a collection of images that is displayed in an organized, and often responsive way, on a web page.

Read lesson →Loading…
Lesson 93

CSS Image Sprites

An image sprite is a collection of various small images put into one larger image file, called a "sprite image".

Read lesson →Loading…
Lesson 94

CSS Attribute Selectors

CSS attribute selectors are used to select and style HTML elements with a specific attribute or attribute value, or both.

Read lesson →Loading…
Lesson 95

CSS Advanced Attribute Selectors

Advanced attribute selectors match elements based on partial attribute values using special operators.

Read lesson →Loading…
Lesson 96

CSS Forms

CSS is used to style HTML forms. The look of an HTML form can be greatly improved with CSS:

Read lesson →Loading…
Lesson 97

CSS Form Inputs

With CSS, you can style most of the different input types, like text fields, password fields, checkboxes, radio buttons, and file inputs. You can also style input labels and form buttons.

Read lesson →Loading…
Lesson 98

CSS Form Focus and Icons

By default, some browsers will add a blue outline around the input when it gets focus (clicked on). You can remove this behavior by adding outline: none; to the input.

Read lesson →Loading…
Lesson 99

CSS Form Elements

By default, a <textarea> can be resized with a "grabber" in the bottom right corner. To remove the grabber, set the resize property to none :

Read lesson →Loading…
Lesson 100

CSS Counters

With CSS counters, you can create dynamic numbering of elements (like headings, sections, or list items) without using JavaScript.

Read lesson →Loading…
Lesson 101

CSS Units

CSS units are used to define the length and size of several properties.

Read lesson →Loading…
Lesson 102

CSS Absolute Units

Absolute units are fixed, and the length expressed in any of these will appear exactly that size.

Read lesson →Loading…
Lesson 103

CSS Relative Units

Relative units specify a length relative to another length property (like parent element, root element, or viewport).

Read lesson →Loading…
Lesson 104

CSS Inheritance

CSS inheritance is about what happens if no value is specified for a property on an element.

Read lesson →Loading…
Lesson 105

CSS Specificity

CSS specificity is an algorithm that determines which style declaration is ultimately applied to an element.

Read lesson →Loading…
Lesson 106

CSS Specificity Hierarchy

Each type of CSS selector has a position in the specificity hierarchy, and the selector types carry different "weights".

Read lesson →Loading…
Lesson 107

CSS The !important Rule

The !important rule is used to give the value of a specific property the highest priority.

Read lesson →Loading…
Lesson 108

CSS Math Functions

CSS math functions allow mathematical expressions to be used as property values.

Read lesson →Loading…