Click Here to view the implementation of margin, border and padding
In the main web page, the left and right margin's of the main div container must be set to auto. Additionally the width of the div container must be set.
Below is the CSS code example:
#wrapper
{
margin-left: auto;
margin-right: auto;
width:80%;
These elements begins on a new line and takes up the whole width of the browser.
The following are HTML elements that are displayed as a block.
This is a paragraph element
Heading Element <h4> ... </h4>Click here to learn about Inline Elements.
This property tells how the HTML element should be displayed on the web page.
display: none;
The HTML element will not display on the web page. This is good for making HTML elements disappear when it is not needed.
display: block;
This will display the HTML element as a block element with a margin on the top and bottom. The paragraph element is an example of an element that is using "block" display by default
display:inline;
It will make the HTML element to be inline with the surrounding text and/ or elements
display: inline-block;
It is an element that will be an inline-level block container. It will display inline with other adjacent inline display elements. It can also be configured with display block properties, such as width and height.