-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhtml-style-internal.html
69 lines (67 loc) · 2 KB
/
html-style-internal.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
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
<!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>HTML - Style Internal CSS 2</title>
<link rel="icon" href="https://raw.githubusercontent.com/coding-dragon/coding-dragon.github.io/master/img/logo.png" type="image/x-icon">
<link rel="stylesheet" href="main.css">
<style>
h4 {
color: #fff;
background-color: #3f51b5
}
code {
background-color: #eee;
color: #111;
border: 2px solid #111;
border-radius: 5px;
padding: 3px 6px;
}
</style>
</head>
<body>
<div class="jumbotron">
<h2 class="display-3">HTML Style Internal CSS</h2>
<p class="lead">
An internal CSS is used to define a style for a single HTML page.<br/>
Other than external stylesheet, adding style every inline element becomes hard to manage and also sometimes style is repeated.<br/>
Inline CSS is added into style element defined n head element. The syntax is as followed:
</p>
<h3>Syntax : <br/>
<pre style="font-size: 20px; line-height: 25px;">
tagname {
property1: value1;
property2: value2;
}
</pre>
</div>
<div class="container p-3 bg-head">
<h3>Internal CSS</h3>
<div class="code">
<pre>
<head>
<style>
<span>p {
color: #fff;
background-color: #3f51b5
}</span>
</style>
</head>
<body>
<p>Internal CSS styled text line</p>
</body></pre>
</div>
</div>
<br/>
<div class="container">
<h4>Internal CSS styled text line</h4>
<br/>
<code>Shift</code> key + <code>alt</code> key
</div>
<hr/>
<br/>
<br/>
</body>
</html>