-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path11class.2assignment.html
More file actions
64 lines (61 loc) · 2.94 KB
/
11class.2assignment.html
File metadata and controls
64 lines (61 loc) · 2.94 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>2Assignment</title>
<style>
h4{
color: brown;
}
</style>
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- <p>Date:19/December/2022</p>
<p>Day:Monday</p>
<p>Class=yes </p> -->
<h1>What is CSS?</h1>
<p>CSS stands for <b>Cascading Style Sheets</b>. It is a style sheet language which is used to describe the look and formatting of a document written in markup language. It provides an additional feature to HTML. It is generally used with HTML to change the style of web pages and user interfaces.</p>
<h2>Types of CSS</h2>
<ul>
<li>Inline CSS</li>
<li>Internal CSS</li>
<li>External CSS</li>
</ul>
<h3><ol>
<li>Inline CSS</li>
</ol>
</h3>
<p>Inline CSS contains the CSS property in the body section attached with element is known as inline CSS. This kind of style is specified within an HTML tag using the style attribute. </p>
<h2>Example:</h2>
<h1 style="color: red;">HELLO</h1>
<h3><ol start="2">
<li>Internal CSS</li>
</ol>
</h3>
<p>This can be used when a single HTML document must be styled uniquely. The CSS rule set should be within the HTML file in the head section i.e the CSS is embedded within the HTML file. </p>
<h1>Example:</h1>
<h4>HELLO</h4>
<h3><ol start="3">
<li>External CSS</li>
</ol>
</h3>
<p>External CSS contains separate CSS file which contains only style property with the help of tag attributes (For example class, id, heading, … etc). CSS property written in a separate file with .css extension and should be linked to the HTML document using link tag. This means that for each element, style can be set only once and that will be applied across web pages.</p>
<h2>Example:</h2>
<h5>HELLO</h5>
<h1>What is a CSS class?</h1>
<p>A CSS class is an attribute used to define a group of HTML elements in order to apply unique styling and formatting to those elements with CSS.</p>
<h2>Example:</h2>
<p>Notice how the second heading, third heading, and final paragraph are styled differently than the rest — this is because these elements have been assigned the class bright. Looking at the CSS, we see the .bright selector, which applies its style rules to all elements with the attribute class="bright".</p>
<!--<h2>This is my first heading.</h2>
<p>This is my first paragraph</p>
<h2 class="bright">This is my second heading.</h2>
<p>This is my second paragraph</p>
<h2 class="bright">This is my third heading.</h2>
<p class="bright">This is my third paragraph</p>-->
<h1>What is ID?</h1>
<p>The difference between class and ID in HTML is that IDs are unique — classes are not. In practice, this means that multiple elements on a page can have the class, while elements can have only one ID and each page can have only one element with that ID.</p>
</body>
</html>