css notes - edl€¦ · css notes november 30, 2016 css notes css stands for cascading style...
TRANSCRIPT
CSS Notes November 30, 2016
CSS NotesCSS stands for Cascading Style Sheets.CSS can be added to HTML elements in 3 ways:
• Inline by using the style attribute in HTML elements
• Internal by using a <style> element in the <head> section
• External by using an external CSS file
HTML Background Color
Inline<html><head></head><body style="backgroundcolor:powderblue;"></body></html>
Internal
<head><style>bodybackgroundcolor: powderblue;</style></head>
CSS Notes November 30, 2016
HTML Text Color Inline
<body ><h1 style="color:blue;"> heading</h1><p style="color:red;">Paragraph.</p></body>
Internal<head><title> Hello</title><style>
h1color: blue;p color: red;
</style></head>
HTML FontsInline
<body ><h1 style="fontfamily:algerian;"> heading</h1><p style="fontfamily:arial;">Paragraph.</p></body>
Internal<head><style>
h1fontfamily:algerian;
p
fontfamily:arial;
</style></head>
CSS Notes November 30, 2016
HTML Text Size
Inline
<body ><h1 style="fontsize:100;"> heading</h1><p style="fontsize:50;">Paragraph.</p></body>
Internal<head><style>
h1fontsize:100;
p
fontsize:100;
</style></head>
HTML Text Alignment
Inline
<body ><h1 style="textalign:center;"> heading</h1><p style="textalign:center;">Paragraph.</p></body>
Internal<head><style>
h1textalign:center;
p
textalign:center;
</style></head>