Sunday, January 15, 2012

How to Use, Add or Apply CSS (Cascading Style Sheets) to HTML

Using and Applying Cascading Style Sheets:

Using External Style Sheets
<link rel="stylesheet" type="text/css" href="style.css" />
Using <style> tag
<style type="text/css">
h1, p {
  margin: 0;
}
h1 {
  font-size:35px;
  color: blue;
}
p {
  color: red;
}
</style>
And using style attribute
<p style="color: green"> This text is green </p>

No comments:

Post a Comment