My First Heading

This is a Paragraph

My Second Heading

This is a Paragraph

My Third Heading

This is a Paragraph

My Fourth Heading

This is a Paragraph

My Fith Heading

This is a Paragraph

My Sith Heading

This is a Paragraph

This is a Link
Snow Mountain

This is a
Parargraph with a line break

This is a red paragraph

This is a paragraph with a title

Heading 1

This is heading 1

This is some text.


This is heading 2

This is some text


This is
a paragraph
with line break

            My Bonnie lies over the ocean.
          
            My Bonnie lies over the sea.
          
            My Bonnie lies over the ocean.
          
            Oh, bring back my Bonnie to me.
        

This is a heading

This is a paragraph

This is a heading

This is a paragraph

This is a heading

This is a paragraph

This is a heading

This is a paragraph

This is a heading

This is a paragraph

This text is bold
This text is important!
This text is italic
This text is emphasized
This is some smaller text.

Do not forget to buy milk today.

My favorite color is blue red.

My favorite color is blue red.

This is subscripted text.

This is superscripted text.

Here is a quote from WWF's website:

For 60 years, WWF has worked to help people and nature thrive. As the world's leading conservation organization, WWF works in nearly 100 countries. At every level, we collaborate with people around the world to develop and deliver innovative solutions that protect communities, wildlife, and the places in which they live.

WWF's goal is to: Build a future where people live in harmony with nature.

The WHO was founded in 1948.

Written by John Doe.
Visit us at:
Example.com
Box 564, Disneyland
USA

The Scream by Edvard Munch. Painted in 1893.

This text will be written from right to left

This is a paragraph.

This is a paragraph

This is a paragraph too.

This is a paragraph.

Hello World

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.

Hello World

Lorem ipsum...

Ut wisi enim...

Hello World

Hello World

Hello World

...

...

...

...

...

A Blue Heading

A red paragraph.

Link text
Visit W3Schools.com!
Visit W3Schools.com!
Visit W3Schools.com!
Visit W3Schools.com!
Visit W3Schools.com!

Absolute URLs

W3C

Google

Relative URLs

HTML Images

CSS Tutorial

A tiger
Send email

Visit our HTML Tutorial
Visit our HTML Tutorial

Chapter 4

Jump to Chapter 4
Jump to a heading 1
Jump to Demo Chapter 1
Forest with water
River flowing

Floating Images

Float the image to the right:

Smiley face A paragraph with a floating image. A paragraph with a floating image. A paragraph with a floating image.

Float the image to the left:

Smiley face A paragraph with a floating image. A paragraph with a floating image. A paragraph with a floating image.


Work Place

Workplace Computer Cup of coffee Phone

Phone Work Place

Workplace

Croissant and Meatballs

Croissant croissant

Lorem ipsum odor amet, consectetuer adipiscing elit. Fames iaculis proin vehicula purus phasellus aliquam lorem. Nec parturient dictum eu at sapien vestibulum placerat aptent. Mattis litora gravida sollicitudin, bibendum nisl duis. Efficitur dictum purus; feugiat conubia id aptent. Montes eleifend fames nec fames nisl egestas commodo. Nascetur dapibus suspendisse congue conubia sollicitudin varius sit adipiscing. Velit tellus posuere vivamus nostra malesuada nulla aptent dignissim. Consectetur varius potenti ullamcorper, vivamus vitae nec sed. Diam non penatibus volutpat sed nostra magnis phasellus fusce. Tempor nullam enim dignissim porttitor magna tristique consectetur molestie. Fringilla aptent commodo enim vel nisl dis amet fermentum. Faucibus fringilla magnis, massa sit enim libero placerat habitasse per. Dapibus sapien pellentesque rutrum leo eget feugiat. Nostra diam lacus elementum iaculis, hendrerit pellentesque lobortis. Maximus mus faucibus eget accumsan imperdiet ut euismod. Tincidunt laoreet ut fringilla tortor aptent, cras metus sed curae. Integer pellentesque et quis orci in. Adipiscing nascetur rutrum eros nam suspendisse mollis tristique. Donec torquent vulputate neque magnis primis elementum nullam vulputate ridiculus. Varius vehicula eleifend accumsan parturient ad cursus class. Est tincidunt natoque cursus dignissim, vel eros cursus taciti. Ridiculus aenean porta mattis curae eros aliquet interdum pulvinar. Non quisque quisque turpis turpis commodo elementum. Viverra et morbi accumsan venenatis adipiscing sed. Justo tempus luctus urna convallis cras nullam. Netus a mollis pretium dapibus diam leo sociosqu penatibus. Habitant scelerisque congue finibus mus mauris dui sagittis viverra. Sapien amet arcu ridiculus diam congue. Per congue mattis libero elementum porttitor leo. Montes himenaeos consectetur aliquam primis; magna mollis fames curae volutpat. Congue senectus penatibus phasellus ac pulvinar. Ridiculus morbi varius ipsum; ornare ultrices vulputate vehicula dolor. Phasellus ipsum facilisis pulvinar hendrerit placerat aenean nisi. Condimentum tempus vestibulum aliquam donec blandit suscipit eu. Elit vivamus praesent rhoncus suscipit morbi. Nisl gravida curabitur egestas eros ridiculus. Felis cubilia torquent taciti dis leo mus imperdiet luctus suscipit. Nulla sit fringilla augue finibus rhoncus inceptos vel. Urna egestas iaculis tempus sollicitudin erat etiam eleifend sem.

Girl with hat

Basic Data Table

Person 1 Person 2 Person 3
Email Tobias Linus
16 14 10

Tables With Borders

Person 1 Person 2 Person 3
Email Tobias Linus
16 14 10

Table data 3

Person 1 Person 2 Person 3
Email Tobias Linus
16 14 10

Data table 4

Person 1 Person 2 Person 3
Email Tobias Linus
16 14 10

Round Table Borders

Person 1 Person 2 Person 3
Email Tobias Linus
16 14 10

Round Table Borders Without Table

Person 1 Person 2 Person 3
Email Tobias Linus
16 14 10

Dotted Table Borders (Style Change)

Person 1 Person 2 Person 3
Email Tobias Linus
16 14 10

Border Color

Person 1 Person 2 Person 3
Email Tobias Linus
16 14 10

HTML Width

Firstname Lastname Age
Jill Smith 50
Eve Jackson 94

HTML Table Column Width

Firstname Lastname Age
Jill Smith 50
Eve Jackson 94

HTML Table Row Height

Firstname Lastname Age
Jill Smith 50
Eve Jackson 94

Vertical Table Headers

Person 1 Email 16
Person 2 Tobias 14
Person 3 Linus 10

Align Table Headers

Person 1 Person 2 Person 3
Email Tobias Linus
16 14 10

Header for Multiple Columns

Name Age
Jill Smith 50
Eve Jackson 94

Table Caption

Monthly savings
Month Savings
January $100
February $50

HTML Table - Cell Padding

Firstname Lastname Age
Jill Smith 50
Eve Jackson 94
John Doe 80

Cellpadding - top - bottom - left - right

Firstname Lastname Age
Jill Smith 50
Eve Jackson 94
John Doe 80

HTML Table - Cell Spacing

Person 1 Person 2 Person 3 Person 4
Email Tobias Linus Mario
16 14 10 14

HTML Table - Colspan

Name Age
Jill Smith 50
Eve Jackson 94

HTML Table - Rowspan

Name Jill
Phone 555-1234
555-8745

HTML Table - Zebra Stripes

First Name Last Name Points
Peter Griffin $100
Lois Griffin $150
Joe Swanson $300
Cleveland Brown $250

HTML Table - Vertical Zebra Stripes

MON TUE WED THU FRI SAT SUN
             
             
             
             

Combine Vertical and Horizontal Zebra Stripes

MON TUE WED THU FRI SAT SUN
             
             
             
             

Horizontal Dividers

Firstname Lastname Savings
Peter Griffin $100
Lois Griffin $150
Joe Swanson $300
Cleveland Brown $250

Hoverable Table

First Name Last Name Points
Peter Griffin $100
Lois Griffin $150
Joe Swanson $300
Cleveland Brown $250

Colgroup

MON TUE WED THU FRI SAT SUN
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28

Multiple Col Elements

MON TUE WED THU FRI SAT SUN
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28

Empty Colgroups

MON TUE WED THU FRI SAT SUN
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28

Hide Columns

MON TUE WED THU FRI SAT SUN
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28

HTML Lists

An Unordered HTML List

An Ordered HTML List

  1. Coffee
  2. Tea
  3. Milk

A Description List

Coffee
- black hot drink
Milk
- white cold drink

Unordered List with Disc Bullets

Unordered List with Circle Bullets

Unordered List with Square Bullets

Unordered List without Bullets

A Nested List

Lists can be nested (list inside list):

Navigation Menu

In this example, we use CSS to style the list horizontally, to create a navigation menu:

Ordered List with Numbers

  1. Coffee
  2. Tea
  3. Milk

Ordered List with Letters

  1. Coffee
  2. Tea
  3. Milk

Ordered List with Lowercase Letters

  1. Coffee
  2. Tea
  3. Milk

Ordered List with Roman Numbers

  1. Coffee
  2. Tea
  3. Milk

Ordered List with Lowercase Roman Numbers

  1. Coffee
  2. Tea
  3. Milk

The start attribute

By default, an ordered list will start counting from 1. Use the start attribute to start counting from a specified number:

  1. Coffee
  2. Tea
  3. Milk
  1. Coffee
  2. Tea
  3. Milk

A Nested List

Lists can be nested (list inside list):

  1. Coffee
  2. Tea
    1. Black tea
    2. Green tea
  3. Milk

HTML Block and Inline Elements

Hello World

Hello World

The P and the DIV elements are both block elements, and they will always start on a new line and take up the full width available (stretches out to the left and right as far as it can).

This is an inline span Hello World element inside a paragraph.

The SPAN element is an inline element, and will not start on a new line and only takes up as much width as necessary.


london

London is the capital city of England. It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.

Standing on the River Thames, London has been a major settlement for two millennia, its history going back to its founding by the Romans, who named it Londinium.

The span element

My mother has blue eyes and my father has dark green eyes.

HTML DIV Example

Lorem Ipsum
I am a div
dolor sit amet.

The yellow background is added to demonstrate the footprint of the DIV element.


HTML DIV Example

London

London is the capital city of England.

London has over 13 million inhabitants.

The yellow background is added to demonstrate the footprint of the DIV element.


Center align a DIV element

London

London is the capital city of England.

London has over 13 million inhabitants.


Multiple DIV Elements

London

London is the capital city of England.

London has over 13 million inhabitants.

Oslo

Oslo is the capital city of Norway.

Oslo has over 600.000 inhabitants.

Rome

Rome is the capital city of Italy.

Rome has almost 3 million inhabitants.

CSS styles are added to make it easier to separate the divs, and to make them more pretty:)


Aligning div elements side by side

London

London is the capital city of England.

London has over 13 million inhabitants.

Oslo

Oslo is the capital city of Norway.

Oslo has over 600.000 inhabitants.

Rome

Rome is the capital city of Italy.

Rome has almost 3 million inhabitants.

Inline-block

London

London is the capital city of England.

London has over 13 million inhabitants.

Oslo

Oslo is the capital city of Norway.

Oslo has over 600.000 inhabitants.

Rome

Rome is the capital city of Italy.

Rome has almost 3 million inhabitants.

Flexbox Example

Align three DIV elements side by side.

London

London is the capital city of England.

London has over 13 million inhabitants.

Oslo

Oslo is the capital city of Norway.

Oslo has over 600.000 inhabitants.

Rome

Rome is the capital city of Italy.

Rome has almost 3 million.

Grid Example

Align three DIV elements side by side.

London

London is the capital city of England.

London has over 13 million inhabitants.

Oslo

Oslo is the capital city of Norway.

Oslo has over 600.000 inhabitants.

Rome

Rome is the capital city of Italy.

Rome has almost 3 million inhabitants.