-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.html
More file actions
31 lines (28 loc) · 851 Bytes
/
example.html
File metadata and controls
31 lines (28 loc) · 851 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
26
27
28
29
30
31
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Example</title>
<link rel="stylesheet" href="style/style.css">
<script>
window.onload = function() {
var para = document.getElementById("example");
// alert(typeof para.nodeName);
// alert(typeof para.style);
// alert("The color is " + para.style.color);
// alert("The font family is " + para.style.fontFamily);
// alert("The font size is " + para.style.fontSize);
para.style.color = "black";
para.style.font = "2em 'Times', serif";
}
</script>
</head>
<body>
<p id="example" style="color: #999999; font-family: 'Arial', sans-serif; font-size: 1em">
An example of a paragraph;
</p>
<!-- <p id="example">
An example of a paragraph;
</p> -->
</body>
</html>