CSS Introduction
CSS
CSS is the language used to style HTML web pages
CSS stands for Cascading Style sheets
CSS Syntax
selector{property:value;}
Eg:- h1{color:red;}
HTML file (mypage.html)
<html>
<head>
<title>Styling using CSS</title>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
<body>
<h1>Welcome to CSS</h1>
<p>This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3 of the License, or at your option any
later version. This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or at your option
any later version This program is free software. NO11 can redistribute</p>
</body>
</html>
Run Code
CSS file (mystyle.css)
body {
background-color:lightgreen;
font-family: "verdana";
}
h1{
color:red;
background-color: yellow;
text-align:center;
}
p{
color:blue;
font-size:22px;
text-align:justify;
}
Run Code