Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP C C++ C# AWS W3.CSS HOW TO BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS DSA TYPESCRIPT ANGULAR ANGULARJS GIT POSTGRESQL MONGODB ASP AI R GO KOTLIN SWIFT SASS VUE GEN AI SCIPY CYBERSECURITY DATA SCIENCE INTRO TO PROGRAMMING INTRO TO HTML & CSS BASH RUST TOOLS

W3.CSS Kitchen Sink

W3.CSS at a Glance

This page demonstrates many W3.CSS classes on one page.

Use it as a quick visual reference or as inspiration for your own pages.

W3.CSS Containers

The w3-container class provides a web page with standard margins, paddings, and standard vertical and horizontal alignments:

This is a Header

London

London is the most populous city in the United Kingdom.

It has a metropolitan area of over 9 million inhabitants.

This is a Footer

The w3-container class is typically used with HTML container elements like:

  • <div>
  • <header>
  • <footer>
  • <nav>
  • <article>
  • <section>
  • <form>

W3.CSS Panels

The w3-panel class is a container class with added top and bottom margin.

I am a panel.

Panels are useful for notes, quotes, and alerts.


W3.CSS Borders

Border

Left Border

Top Border

Bottom Border


W3.CSS Cards

The w3-card class is suitable for both images and notes:

A Car

A car is a wheeled, self-powered motor vehicle used for transportation. Most definitions of the term specify that cars are designed to run primarily on roads, to have seating for one to eight people, and to typically have four wheels.

(Wikipedia)

Amazing

French Alps

French Alps


W3.CSS Responsive Page Sizes

w3-content centers content with a maximum width.


w3-auto creates a responsive centered container.



W3.CSS Flexbox

The w3-flex class defines a container for flexbox items.

The children of the flexbox container automatically become flexbox items.

1

2

3


Left
Center
Right

Fixed

Flexible


W3.CSS Grid

The w3-grid class creates a parent container for grid items.

The children of the grid container automatically become grid items.

1

2

3

4

5

6

7

8


W3.CSS Rows

The w3-row class can divide rows into halves, thirds, and quarters.

The columns automatically stack on small screens.

w3-half

w3-half


w3-third

w3-third

w3-third


w3-quarter

w3-threequarter


W3.CSS Cells

The w3-cell class creates simple column layouts.

Cells can automatically adjust their width and height and can be vertically aligned.

Hello W3.CSS Cell

Hello W3.CSS Cell

Hello W3.CSS Cell

Hello W3.CSS Cell

Hello W3.CSS Cell

Hello W3.CSS Cell


12-Column Layout

The w3-row class can also divide a web page into 12 columns.

The class supports a 12 column mobile-first fluid grid with small, medium, and large classes.

1
2
3
4
5
6
7
8
9
10
11
12

s12 m6 l4

s12 m6 l4

s12 m12 l4

  • s12 uses 12 columns on a small screen
  • m6 uses six columns on a medium screen
  • l4 uses 4 columns on a large screen

W3.CSS Layout Choices

Layout Use For
Flexbox Rows or columns, alignment, and flexible items
Grid Modern layouts with rows and columns
Rows Simple halves, thirds, and quarters
Cells Simple equal-height, table-like layouts
12-Column Layout Compatibility with older W3.CSS responsive layouts

For new layouts, Flexbox and Grid are usually the most flexible choices.

The older W3.CSS layout classes remain supported for compatibility and convenience.


W3.CSS Display Classes

The w3-display classes allow you to display HTML elements in specific positions:

Lights
Top Left
Top Right
Bottom Left
Bottom Right
Left
Right
Middle
Top Middle
Bottom Middle

W3.CSS Padding

Padding creates space inside an element.

W3.CSS provides classes for adding different amounts of padding.

Padding

The blue space around this text is padding.


W3.CSS Margins

Margins create space outside an element.

W3.CSS provides classes for adding margins around or beside elements.

Margin

The white space around this green element is its margin.


W3.CSS Notes

Note

Yellow is often used for notifications.

London is the most populous city in the United Kingdom, with a metropolitan area of over 9 million inhabitants.


London is the most populous city in the United Kingdom, with a metropolitan area of over 9 million inhabitants.


London is the most populous city in the United Kingdom, with a metropolitan area of over 9 million inhabitants.


W3.CSS Quotes

"Make it as simple as possible, but not simpler."

Albert Einstein


W3.CSS Alerts

Danger!

Something needs immediate attention.

Warning!

Something might need attention.

Success!

The operation completed successfully.

Info

Here is some useful information.


W3.CSS Buttons

The w3-button and w3-btn class provides buttons of all sizes and types.

Wide buttons:

Circular or square buttons:

+ + +

+ + +


W3.CSS Tables

First Name Last Name Points
Jill Smith 50
Eve Jackson 94
Adam Johnson 67

W3.CSS Lists

  • Members

  • John
  • Paul
  • Lisa

W3.CSS Images

Lights

Responsive width

Forest

Rounded

Mountains

Circle

Normal

Normal

Opacity

Opacity

Grayscale

Grayscale

Sepia

Sepia


W3.CSS Input Forms

The w3-input class plays together with the other input classes: w3-check, w3-radio and w3-select.

Input Form










W3.CSS Rounded Corners

The w3-round classes add rounded corners to any HTML element.

Round Round Large Round XLarge


W3.CSS Tags

The w3-tag class is capable of displaying all kinds of tags, labels and signs:

New Warning Danger Info

Falcon Ridge Parkway

S
A
L
E

DO NOT
BREATHE
UNDER WATER

W3.CSS Badges

The w3-badge class creates circular badges. The default color is black.

1 2 3 4

A B C D


W3.CSS Bars

The w3-bar class is used to style horizontal bars.


W3.CSS Navigation


W3.CSS Dropdowns


W3.CSS Accordions

Accordion content.


W3.CSS Tabs

London

London is the capital of England.


Progress Bars

25%

50%

W3.CSS Modals

×

Modal

This is a modal dialog.

Footer


Tooltips

Hover over this text Tooltip content


W3.CSS Effects

Normal

w3-opacity

w3-grayscale-max

w3-sepia-max


W3.CSS Animations

Top

Left

Right

Zoom


W3.CSS Pagination

« 1 2 3 4 »

Dark Mode

Dark Content

W3.CSS color classes can be used to build dark interfaces.


W3.CSS Colors

Red

Green

Blue

Yellow

Amber

Olive

Indigo

Lime

Light Grey

Black



×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookies and privacy policy.

Copyright 1999-2026 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.