Cascading Style Sheets: By: Shaina Ashraf
Cascading Style Sheets: By: Shaina Ashraf
sheets
By: Shaina Ashraf
Internal
using a <style> element in the HTML <head> section
Using IDs
Using Class
External
using one or more external CSS files
In-line Style
<p style="color:blue;marginleft:30px; >text</p>
<h1 style="color:blue">This is a
Blue Heading</h1>
Internal
Embedded, or internal, styles are
used for the whole page.
Inside the head element, the style
tags surround all of the styles for the
page.
<head>
Internal
<title>CSS Example</title>
<style>
p{
color: red;
}
a{
color: blue;
}
</style>
<head>
<style>
p{
Internal
padding:10px;
margin:30px;
</style>
</head>
<body>
<h1>This is a heading</h1>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
<p>This is a paragraph.</p>
</body>