-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLearning_HTML.html
More file actions
81 lines (76 loc) · 3.01 KB
/
Copy pathLearning_HTML.html
File metadata and controls
81 lines (76 loc) · 3.01 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!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>Document</title>
</head>
<body>
<h1><b> Learning HTML </b></h1>
<p>
Q1. What is an element ?<br>
=> Elements are the indivisual components of an HTML document. e.g. - Heading tags, Paragraph tags etc.<br>
HTML Elements are what make up HTML in general.<br>
Q2. What is an attribute ?<br>
=> HTML attributes are special words used inside the opening tag to control the element's behaviour.<br>
HTML attributes are a modifier of an HTML element type.<br>
<h2><b>Syntax of an attribute -></b>></h2>
<tagName attributeName = "attributeValue"></tagName>
Example ->
<p align="centre">We have used an attribute, named "align" to centralize the text.</p>
* Required attributes in elements :
=> The "img" tag required a "src" attribute, the "input" type required a "type" attribute.
Q3. What is bollean attribute ? -> [Present in notes]
</p>
<hr>
<p>
General Purpose Attributes :
1. ID : Get used for unique naming attributes. [Suggested to use for single elements, not containing any more elements]
Required CSS selector is - #
2. Class : Non-unique naming. [Can be used for naming an element containing multiple elements]
Required CSS selector is - .
Q4. What is a plug-in ?
</p>
<hr>
<p><b><h2>
Important Elements :</h2></b>
1. Heading elements ->
<h1>Hello World!</h1> <!--Used to display - most important text-->
<h2>Hello World!</h2> <!--Used to display - sub heading-->
<h3>Hello World!</h3>
<h4>Hello World!</h4>
<h5>Hello World!</h5>
<h6>Hello World!</h6>
</p>
<hr>
<h2>HTML Entities : </h2>
<p>An HTML entity is a piece of text ("string") that begins with an ampersand ( & ) and ends with a semicolon ( ; ). <br>
Entities are frequently used to display reserved characters (which would otherwise be interpreted as HTML code), and invisible characters (like non-breaking spaces).
</p>
<h2>List : </h2>
<h4>Ordered list -></h4>
<ol type="A">
<li>List item : 01</li>
<li>List item : 02</li>
</ol>
<h4>Unordered list -></h4>
<ul> <!--can use "type" attributes for different listed item initializers -->
<li>List item : 01</li>
<li>List item : 02</li>
</ul>
<p><b>Nesting of lists : </b></p>
<ol>
<li>List item : 01</li>
<ul>
<li>Nested list item - 01</li>
<li>Nested list item - 02</li>
</ul>
<li>List item : 02</li>
<ul>
<li>Nested list item - 03</li>
<li>Nested list item - 04</li>
</ul>
</ol>
</body>
</html>