Welcome to the third part of HTML class.
In this part, you will learn more about styling. In fact, you will learn CSS, Cascading Style Sheets.
This is an important way to style your HTML files quickly and is used by many Website-Programmers.
This is a regular HTML file that prints 'Hello World':
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<html> <head> <style> <style> </head> <body> <h1>Hello World</h1> </body> </html> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<html> <head> <style> H1 { color: red; } <style> </head> <body> <h1>Hello World</h1> </body> </html> |
1 2 3 4 |
H1 { color: red; } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<h1>CSS Pocket Reference</h1> <p> When you're working with <em>CSS</em> and need a quick answer, <em>CSS Pocket Reference</em> delivers. This handy, concise book provides all of the essential information you need to implement <em>CSS</em> on the fly. Ideal for intermediate to advanced web designers and developers, the fourth edition is revised and updated vor <em>CSS3</em>, the latest version of the <em>Cascading Style Sheet</em> application. Along with a complete alphabetical reference to <em>CSS3</em> selectors and properties you'll also find a short introduction to the key concepts of <em>CSS</em>.<br/><br/> Based on <em>Cascading Style Sheet: The Definitive Guide</em>, this reference is an easy-to use cheat sheet of the <em>CSS</em> specifications you need for any task at hand. </p> <h2>This book helps you:</h2> <ul> <li>Quickly find and adapt the style elements you need </li> <li>Learn how <em>CSS3</em> features complement and extend your <em>CSS</em> practices</li> <li>Discover new value types and new <em>CSS</em> selectors</li> <li>Implement drop shadows, multiple backgrounds, rounded corners, and border images</li> <li>Get new information about transforms and transitions</li> </ul> |
color | {red, green, blue, yellow, ...} |
background-color | {red, green, yellow, magenta, blue, ...} |
border | {1px, 2px, 3px, ...} {none, dotted, dashed, solid, double, inset, outset} {red, green, yellow, blue,...} |
border-bottom | {same as for border} |
border-top | {same as for border} |
border-left | {same as for border} |
border-right | {same as for border} |
width | {50px, 100px, 50%, 100%, ... } |
height | {50px, 100px, 50%, 100%, ... } |
text-align | {left, center, right, start, end} |
text-decoration | {none, underline, overline, line-through, blink} |
text-transform | {uppercase, lowercase, capitalise, none} |
word-spacing | {normal, 1px, 2px, 3px, ...} |
font-weight | {normal, bold, bolder, lighter, 100, 200, 300, ..., 900} |
font-style | {normal, italic, oblique} |
font-size | {xx-small, x-small, small, medium, large, x-large, xx-large, smaller, larger, 5px, 10px, ...} |
1 2 3 4 |
H1 { border: 3px dashed green; } |