-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmy html basics.txt
More file actions
128 lines (95 loc) · 2.08 KB
/
my html basics.txt
File metadata and controls
128 lines (95 loc) · 2.08 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
Introduction to HTML
1. Basic Structure
The basic structure of any HTML document is as follows:
<!DOCTYPE html>
<html>
<head></head>
<body>
Your code goes here
</body>
</html>
2. Heading Element
The HTML h1 element defines a main heading.
<h1>Preetham</h1>
<h2>Preetham</h2>
<h3>Preetham</h3>
<h4>Preetham</h4>
<h5>Preetham</h5>
<h6>Preetham</h6>
varies in size of the text
3. Paragraph Element
The HTML p element defines a paragraph.
<p>I live in Hyderabad</p>
4. Button Element
The HTML button element defines a button.
<button>Know more</button>
5. Container Element
The HTML div element defines a container.
<div>
<h1>Tourism</h1>
<p>Plan your trip wherever you want to go</p>
<button>Get Started</button>
</div>
6. Images
we can insert whatever image we want by
<img src="" alt="" />
7. <hr>
we use this to draw an horizontal line
8. <br>
It is used to break the line
9.<strong></strong>, <b></b>
The above tags are useful to bold the content
10. <em></em>, <i></i>
The above tags are useful to italicize the content
11. links
<ahref=""> content </a>
12. Lists
There are three types of lists
They are 1. orderes lists
<ol>
<li></li>
</ol>
2. unorderes lists
<ul>
<li></li>
</ul>
3. defination lists
<dl>
<dt></dt>
<dd></dd>
</dl>
13. Tables
<table>
<tr></tr>
</table>
In the tables there are also table head, table body, table footer.
<table>
<thead></thead>
<tbody></tbody>
<tfooter></tfooter>
</table>
CSS Properties
1.Tag Selectors
syntax
selector{
attributes
}
2.Class Selectors
syntax
.classname{
attributes
}
3. Id Selectors
#id{
attributes
}
In all these three class has high priority than the other, and also id selectors can only be used in specific things not in all the cases
4. Text Align
The CSS text-align property specifies the horizontal alignment of the text in an element.
h-center {
text-align: center;
}
Value Description
center Aligns the text to the center
left Aligns the text to the left
right Aligns the text to the right