W3.CSS

Navigation Bar with Input and Buttons

Input and button inside navbar:

Home Link 1 Link 2

Padded navbar:

Home Link 1 Link 2
W3.CSS

Horizontal Bar

An horizontal bar is a common web design element:

London
Paris
Tokyo
W3.CSS

Hello W3.CSS Cell.

Hello W3.CSS Cell.

W3.CSS

1

2

3

W3.CSS

Form Elements in a Grid

In this example, we use W3.CSS' Responsive Grid System to make the inputs appear on the same line (on smaller screens, they will stack horizontally with 100% width). You will learn more about this later.

W3.CSS

Select Your Free Option

W3.CSS

Radio Buttons

W3.CSS

Checkboxes

W3.CSS

Input Form

W3.CSS

Responsive Table

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

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

Resize the screen to see the effect.

W3.CSS

Stretch

The w3-stretch class removes the right and left margins from an element. This class is often used to stretch a padded row:

An example with w3-stretch:

An example without w3-stretch:

W3.CSS

Movies 2014

Movies 2014
W3.CSS

Codespan

The w3-codespan class is used to hightlight inline code:

The following HTML elements: span, section, and div defines a section in a document.

W3.CSS

Code Containers

The w3-code class create code containers to highlight HTML, JavaScript and CSS code.

HTML Example

<!DOCTYPE html>
<html>
<title>HTML Tutorial</title>
<body>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>

CSS Example

body {
background-color: #d0e4fe;
}

h1 {
color: orange;
text-align: center;
}

p {
font-family: "Times New Roman";
font-size: 20px;
}

JavaScript Example

var x = 5; // assign the value 5 to x
var y = 2; // assign the value 2 to y
var z = x + y; // assign the value
W3.CSS

Code Containers

The w3-code class create code containers to highlight HTML, JavaScript and CSS code.

HTML Example

<!DOCTYPE html>
<html>
<title>HTML Tutorial</title>
<body>

<h1>This is a heading</h1>
<p>This is a paragraph.</p>

</body>
</html>

CSS Example

body {
background-color: #d0e4fe;
}

h1 {
color: orange;
text-align: center;
}

p {
font-family: "Times New Roman";
font-size: 20px;
}

JavaScript Example

var x = 5; // assign the value 5 to x
var y = 2; // assign the value 2 to y
var z = x + y; // assign the value
W3.CSS

Full-width

The w3-block class can create a full-width button.

Norway
W3.CSS

The w3-display-container Class

Display content inside a div element with a specific height:

Top Left
Top Right
Bottom Left
Bottom Right
Left
Right
Middle
Top Mid
Bottom Mid

Display text inside an image:

Lights

Top Left

Top Right

Bottom Left

Bottom Right

Top Mid

Left
Right
Middle

Bottom Mid

Positioned

(We have added w3-container classes and p elements to get correct padding)

W3.CSS

Tags

The w3-tag class creates a tag/label:

News New!

Comments More Later!

W3.CSS

Badges

The w3-badge class creates circular badges:

News 6

Comments 10

Modern W3.CSS Template

1

2

3

4

5

6

7

8

9

W3.CSS

Border Around Table

The w3-border class adds a border around the table.

First Name Last Name Points
Jill Smith 50
Eve Jackson 94
Adam Johnson 67
W3.CSS
w3-container w3-teal">

This is a Header

W3.CSS

Displaying Panels

Panels are the same as containers except for an added top and bottom margin.

I am a panel

I am a panel

I am a container

I am a container