Website Coloring & Layout (CSS)
CSS (Cascading Style Sheets) : It is used to control the style of a web document in a simple and easy way.
There are three ways you can add CSS to your TAG,
1) Using Style attribute. For example
2) Using <style> tag in your <head> tag. For example
3) Using a separate CSS file (It is recommended technique). For example
aleena.css
----------
h1{
color:white;
background-color:purple;
padding:5px;
}
p{
color:blue;
}
aleena.html
----------------
<html>
<head>
<link rel="stylesheet" href="aleena.css">
</head>
<body>
<h1>Aleena Bagwan</h1>
<p>I am aleena bagwan.</p>
</body>
</html>
There are three ways you can add CSS to your TAG,
1) Using Style attribute. For example
<html>
<body>
<h1 style="color: white; background-color: red; padding:5px; text-align: center">Aleena Bagwan</h1>
<p style="color: blue;">I am aleena bagwan.</p>
</body>
</html>
2) Using <style> tag in your <head> tag. For example
<html>
<head>
<style>
h1{
text-align:center;
color:white;
background-color:green;
padding:5px;
}
p{
color:blue;
}
</style>
</head>
<body>
<h1>Aleena Bagwan</h1>
<p>I am aleena bagwan.</p>
</body>
</html>
3) Using a separate CSS file (It is recommended technique). For example
aleena.css
----------
h1{
color:white;
background-color:purple;
padding:5px;
}
p{
color:blue;
}
aleena.html
----------------
<html>
<head>
<link rel="stylesheet" href="aleena.css">
</head>
<body>
<h1>Aleena Bagwan</h1>
<p>I am aleena bagwan.</p>
</body>
</html>
Comments
Post a Comment