-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnode1.js
73 lines (69 loc) · 2.3 KB
/
node1.js
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
const hostname = '127.0.0.1';
const port = 3000;
const server = http.createServer((req, res) => {
res.statusCode = 200;
res.setHeader('Content-Type', 'text/html');
// res.end('Hello World this is Rohan Das');
res.end(`<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Pseudo selectors & more designing</title>
<style>
.container{
border: 2px solid red;
background-color: rgb(223, 245, 201);
padding: 34px;
margin: 34px auto;
width: 666px;
}
a{
text-decoration: none;
color: black;
}
a:hover{
color: rgb(5, 0, 0);
background-color: rgb(221, 166, 38);
}
a:visited{
background-color: yellow;
}
a:active{
background-color:darkblue;
}
.btn{
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-weight: bold;
background-color: crimson;
padding:6px;
border: none;
cursor:pointer;
font-size: 13px;
border-radius: 4px;
}
.btn:hover{
color:darkgoldenrod;
background-color:rgb(223, 245, 201);
border: 2px solid black;
}
</style>
</head>
<body>
<div class="container" id="cont1">
<h3>This is my heading</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Obcaecati, reprehenderit. Quam culpa eius aliquam id cumque saepe, provident odio sed eos quia nihil modi error voluptate vero autem quibusdam aperiam exercitationem! Quam, consequuntur velit.</p>
<a href="https://yahoo.com" class="btn">Read more</a>
<button class="btn">Contact us</button>
</div>
</body>
</html>`);
});
// server.listen(port, hostname, () => {
// console.log(`Server running at http://${hostname}:${port}/`);
// });
//I f you assign a value to a variable and then press '_' then it returns the value of the recent variable assigned with value
//>a=34
//>_
//>