HTML & CSS





What is HTML

HTML stands for Hyper Text Markup Language . An HTML file is a text file containing small markup tags.The markup tags tell the Web browser how to display the page .An HTML file must have an htm or html file extension .An HTML file can be created using a simple text editor

HTML Tags

What is CSS

How to Insert Style Sheet

When a browser reads a style sheet, it will format the document according to it. Style sheet could be inserted as external or internal External Style Sheet An external style sheet is ideal when the style is applied to many pages. With an external style sheet, you can change the look of an entire Web site by changing one file. Each page must link to the style sheet using the <link> tag. The <link> tag goes inside the head section:

<head>
<link rel="stylesheet" type="text/css"
href="mystyle.css" />
</head>

The browser will read the style definitions from the file mystyle.css, and format the document according to it. An external style sheet can be written in any text editor. The file should not contain any html tags. Your style sheet should be saved with a .css extension. An example of a style sheet file is shown below:

hr {color: sienna}
p {margin-left: 20px}
body {background-image: url("images/back40.gif")}
Internal Style Sheet An internal style sheet should be used when a single document has a unique style. You define internal styles in the head section by using the <style> tag, like this:

<head>
<style type="text/css">
hr {color: sienna}
p {margin-left: 20px}>
body {background-image: url("images/back40.gif")}
</style>
<head>

The browser will now read the style definitions, and format the document according to it.

Experiment

I have used my knowledge of HTML and Cascaded Style Sheets to create all the web pages for the this course. I have two different style sheets for the index page and for the rest of the pages. Given below are the style sheets:
STYLE SHEET FOR THE PAGES OF THIS WEB SITE

h1 {color: Crimson;font-size:200%;text-align:center;font-family:times}
h2 {font-size:150%;text-align:left;font-family:times}
h3 {font-size:100%;text-align:left;color:DarkOrchid;font-family:times}
p {font-family:times;color:black;text-align:left;text-indent: 1cm;line-height:140%}
li {color:IndianRed;font-weight: bold;font-style:italic}
body { display: block}
p { display: block }
#sidebar {
position: absolute;
width: 20%;
height: auto;
top: 15%;
right: auto;
bottom: 100px;
left: 1%;
background-color:LavenderBlush;

}

#main {
position: absolute;
width: 75%;
height: auto;
top: 15%;
right: 5%;
bottom: 100px;
left: 25%;
}

reference:: http://www.w3.org/TR/CSS2/visuren.html#q24