summaryrefslogtreecommitdiffstats
path: root/dom/tests/js/style2.html
blob: cc4231414259ed19b7dc5fc4bf31e49055a4b526 (plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<html>
<head>
<title>Example 0</title>
<style>
 a#id.foo:visited:first-line { color: red; }
 a#id.foo:first-line { color: red; }
 a#id.foo:visited { color: red; }
 a#id:first-line { color: red; }
 a#id:visited { color: red; }
 a:first-line { color: red; }
 a:visited { color: red; }
 a:visited:first-line { color: red; }
 a:visited:visited { color: red; }
 a:first-line:visited { color: red; }
 :active { color: blue; }
 :first-letter { color: green; }
</style>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<table border=4>
<tr>
<td>
<h1>Example 0: Basic HTML Text Styles</h1>
</td>
<td>
more table cell
</td>
</tr>
<tr>
<td>second row</td>
<td>second row</td>
</tr>
</table>
<p><br></p>
<h2>Formatted Text</h2>
<p>This is a basic paragraph with <b>bold</b>, <i>italic</i> and <i>bold-italic 
  </i> text. It also includes <font color="#FF0000">red</font>, <font color="#00FF00">green</font> 
  and <font color="#0000FF">blue</font> text. It has <s>strikethru</s> and <u>underline</u>. 
  <u> </u></p>
<p>This is a paragraph with font variations: <b><font face="Arial, Helvetica, sans-serif">Arial,</font></b><font face="Arial, Helvetica, sans-serif"> 
  <i><font face="Verdana, Arial, Helvetica, sans-serif">Verdana</font>,</i> <font face="co">COURIER, 
  <font face="Times New Roman, Times, serif">Times New Roman.</font></font></font></p>
<p><font size=7>Font size=7, </font><font size=6>Font size=6, </font><font size=5>Font 
  size=5, </font><font size=4>Font size=4, </font><font size=3>Font size=3, </font><font size=2>Font 
  size=2, </font><font size=1>Font size=1, </font><font point-size=24 font-weight=700>Font 
  point-size=24 font-weight=700</font></p>
<p><THREED>3D Text. 3D Text. 3D Text. 3D Text. 3D Text. </THREED><br>
<h2><br>
</h2>
<h2>Listings</h2>
<h3>Bulleted List </h3>
<ul>
  <li>One</li>
  <li>Two
    <ul>
      <li>Apples</li>
      <li>Oranges</li>
      <li>Bananas</li>
    </ul>
  </li>
  <li>Three</li>
</ul>
<br>
<h3>Numbered List </h3>
<ol>
  <li>One</li>
  <li>Two 
    <ol>
      <li>Apples</li>
      <li>Oranges</li>
      <li>Bananas</li>
    </ol>
  </li>
  <li>Three</li>
</ol>
<h2>Justified Text</h2>
<p>This paragraph is aligned <b>left</b>. This paragraph is aligned <b>left</b>. 
  This paragraph is aligned <b>left</b>. This paragraph is aligned <b>left</b>. 
  This paragraph is aligned <b>left</b>. This paragraph is aligned <b>left</b>. 
  This paragraph is aligned <b>left</b>. </p>
<p align="RIGHT">This paragarph is aligned <b>right. </b>This paragarph is aligned 
  <b>right. </b>This paragarph is aligned <b>right. </b>This paragarph is aligned 
  <b>right. </b>This paragarph is aligned <b>right. </b>This paragarph is aligned 
  <b>right. </b>This paragarph is aligned <b>right. </b><b> </b>This paragarph 
  is aligned <b>right. </b></p>
<p align="CENTER">This paragraph is aligned <b>center</b>. This paragraph is aligned 
  <b>center</b>.This paragraph is aligned <b>center</b>.This paragraph is aligned 
  <b>center</b>.This paragraph is aligned <b>center</b>.This paragraph is aligned 
  <b>center</b>.This paragraph is aligned <b>center</b>.This paragraph is aligned 
  <b>center</b>.This paragraph is aligned <b>center</b>.This paragraph is aligned 
  <b>center</b>.</p>
<p></p>
<p>&nbsp;</p>
<script>
var r = 0, g = 0, b = 0;
var h = document.documentElement.childNodes[1].childNodes[1].childNodes[0].childNodes[0].childNodes[0].childNodes[1];
h.style.borderStyle = "groove";

function changeColor() {
  r += 5;
  g += 2;
  b += 3;
  r %= 255;
  g %= 255;
  b %= 255;

  h.style.backgroundColor = "rgb(" + r + "," + g + "," + b + ")";
  h.style.color = "rgb(" + (255-r) + "," + (255-g) + "," + (255-b) + ")";
  h.style.fontSize = "" + (r/3) + "pt";
  h.style.borderWidth = "" + (r/5) + "px";
  h.style.borderColor = h.style.color;
}

setInterval(changeColor, 40);
</script>
</body>
</html>