File tree 4 files changed +49
-0
lines changed
JavaScript/Advance/DOM/6. DOM CSS
4 files changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+
4
+ < head >
5
+ < meta charset ="UTF-8 ">
6
+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
7
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
8
+ < title > DOM-CSS</ title >
9
+ < link rel ="stylesheet " href ="style.css ">
10
+ </ head >
11
+
12
+ < body >
13
+ < h1 > DOM CSS</ h1 >
14
+ < h2 > Example One</ h2 >
15
+ < p id ="textOne "> Hello there</ p >
16
+ < button onclick ="DisplayOne() "> Click</ button >
17
+ < h2 > Example Two</ h2 >
18
+ < p id ="textTwo "> Hello there</ p >
19
+ < button onclick ="DisplayTwo() "> Click</ button >
20
+ < h2 > Example Three</ h2 >
21
+ < p id ="textThree "> Hello there</ p >
22
+ < button onclick ="DisplayThree() "> Click</ button >
23
+ < script src ="script.js "> </ script >
24
+ </ body >
25
+
26
+ </ html >
Original file line number Diff line number Diff line change
1
+ let textOne = document . getElementById ( 'textOne' ) ;
2
+
3
+ function DisplayOne ( ) {
4
+ textOne . style . color = "red" ;
5
+ }
6
+
7
+ let textTwo = document . getElementById ( 'textTwo' ) ;
8
+
9
+ function DisplayTwo ( ) {
10
+ textTwo . style . fontSize = "30px" ;
11
+ }
12
+
13
+ let textThree = document . getElementById ( 'textThree' ) ;
14
+
15
+ function DisplayThree ( ) {
16
+ textThree . style . fontFamily = "monospace" ;
17
+ textThree . style . fontSize = "30px" ;
18
+ textThree . style . color = "blue" ;
19
+ textThree . style . fontWeight = "700" ;
20
+ }
Original file line number Diff line number Diff line change
1
+ h2 {
2
+ font-family : monospace;
3
+ }
You can’t perform that action at this time.
0 commit comments