In W3.CSS, container is a simple box that can contain any HTML content like- text, images, tables, links, lists, forms etc.
The HTML tags that can use W3.CSS container are:
. . .
. . .
. . .
. . .
We simply add a class w3-container along with a colour to the mentioned tags.
India
India is a great country. Geographically it is located in South Asia.
Here, the class w3-container makes a container and, the class w3-indigo puts an indigo background to the div.
Output:
Even the tags <div>, <header>, <footer>, <section> and <article> behave same:
An example showing containers using <header>, <footer>, <section> and <article> tags:
India
India is a great country. Geographically it is located in South Asia.
Culture
India is a great country. Geographically it is located in South Asia. India is a great country. Geographically it is located in South Asia. India is a great country. Geographically it is located in South Asia.
History
India is a great country. Geographically it is located in South Asia. India is a great country. Geographically it is located in South Asia. India is a great country. Geographically it is located in South Asia.
Output:
As we seen the output on previous slide, the following outcomes can be observed:
- We see that all container elements are stuck to each other.
- An element with a W3.CSS container does not has any margin.
- But has a padding of 16px in left and right.
- All the tags <div>, <header>, <footer>, <section> and <article> behave the same.
Linux Commands
Computer Networks
Python Programming
Computer System Architecture
HTML  CSS  W3.CSS  JavaScript  ReactJS
Copyright 2018. All Rights Reserved.