-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathintroductoryCSS.html
More file actions
25 lines (22 loc) · 931 Bytes
/
introductoryCSS.html
File metadata and controls
25 lines (22 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!DOCTYPE html>
<!-- We can add some style to our documents using CSS (Cascaded Style Sheets). -->
<html>
<!-- We can either define CSS styles within an HTML document, or we can reference CSS styles from an external file. -->
<link rel="stylesheet" href="styles.css">
<style>
h1{color:blue;background-color:gray;font-size:5em;}
p{color:darkslategray;background-color:crimson;font-size:2em}
ul{background-color:black}
</style>
<h1>Hello, World!</h1>
<p>Welcome to CSS!</p>
<ul>
<li class="greenItems">item 1</li>
<li class="redItems">item 2</li>
<li class="greenItems">item 3</li>
<li class="redItems">item 4</li>
<li class="greenItems">item 5</li>
</ul>
<!-- ID styles can only be used once, as opposed to class styles, which can be used repeatedly. -->
<p id="poundStyle">We are using the ID style on this text.</p>
</html>