INTRODUCTION TO CSS
INTRODUCTION TO CSS
CSS stands for Cascading Style Sheet.CSS is used to design HTML tags.CSS is a widely used language on the web.HTML, CSS and JavaScript are used for web designing. It helps the web designers to apply style on HTML tags.
CSS Example :
<!DOCTYPE><html><head>
<style>
h1
{
color:green;
background-color:yellow;
padding:5px;
}
p
{
color:blue;
}
</style>
</head>
<body>
<h1>MY FIRST CSS</h1>
<p>THIS IS MY CSS.</p>
</body>
</html>
How to Link a CSS with HTML ?
- Create another text file in the same directory as the
doc1.htmldocument you created in the first section. - Save your document as:
style1.css. This file will be your stylesheet. - In your CSS file, copy and paste this one line, then save the file:
strong {color: red;}
- To link your document to your stylesheet, edit your HTML file. Add the line highlighted here:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Sample document</title> <link rel="stylesheet" href="style1.css"> </head> <body> <p> <strong>C</strong>ascading <strong>S</strong>tyle <strong>S</strong>heets </p> </body> </html> - Save the file and refresh your browser's display. The stylesheet makes the initial letters red, like this:
Comments
Using CSS, you store the style information in common files that all the pages share.
When a user displays a web page, the user's browser loads the style information along with the content of the page.
When a user prints a web page, you can provide different style information that makes the printed page easy to read.
for implementation you can use our given information with the helpof example .
I think you can easily understand the concepts of your question and if you any other query or suggestion post a commnet.