html
html
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
26
<!--Created by Ryan Lusby-->
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<!--you can add color to an individual element-->
<h1 id="blue">I am blue</h1>
<!--you can add color to multiple elements at once wrapping them in a div containter or by styling the parent element-->
<div id="red">
<h1>I am red</h1>
<p>I am also red</p>
<ol>
<li>red</li>
<li>red</li>
<!--The below list item gains the red color from its parent div containter, but because we gave the below list item an id style of its own we can override the parent to make it green-->
<li id="green">I am green</li>
</ol>
</div>
<!--below is adding inline css but this is not best practice-->
<h2 style="color:purple;">I am purple</h2>
</body>
</html>
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
4
5
6
7
8
9
10
11
12
body {
}
#blue{
color:blue;
}
#red{
color:red;
}
#green{
color:green;
}
Enter to Rename, Shift+Enter to Preview
js
js
1
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run