Saturday, January 17, 2015

How to CSS Header, Body, Page

CSS means Cascading Style Sheet language which is used for describing the look and formatting of a document written in a markup language. However, let's learn how to CSS Header, Body and Page of a document.

Here if you want to change the background color of the body, just you have to change the color code no.( #00FFFF) which is between
body {
    background-color:
#00FFFF;
}

  After that if you want to stylize the header, you will have to change the following code:
h1 {
    color: red;
    text-align: left;
}


Here you can change 'text-align' left or right as you like best. Besides, if you want to CSS the page according to your liking, you will have to change this following code: 

p {
    font-family: "Calibri";
    font-size: 20px;
    color: Blue
}


Here p means page. Thus you will have to change the code for CSS of the document. Finally you will write your own document name between <h1>............</h1> and <p>...........</p> and that is done.


<!DOCTYPE html>
<html>
<head>
<style>
body {
    background-color: #d0e4fe;
}

h1 {
    color: red;
    text-align: left;
}

p {
    font-family: "Calibri";
    font-size: 20px;
    color: Blue
}
</style>
</head>
<body>

<h1>Your Own Document</h1>
<p>This is a paragraph.</p>

</body>
</html>



 Color is an important element of CSS. So for this you will have know the color code. To know the color code, you can visit this color codes link

No comments:

Post a Comment

Contact

Name

Email *

Message *