Class Notes On HTML and Css
Class Notes On HTML and Css
S S
HTML is t he code t ha t is us ed t o
stru c tur e a w eb page and i ts con t en t .
Con t en t
Elemen t
Basic HTML Page
<!DOCTYPE h t ml > t ell s b r o ws e r y o u a r e us ing HTML 5
h1 ( mo st impo rt an t )
h2
h3
h4
(least impo rt an t )
h5
Par agr aph Tag
Used t o add pa r ag r aph s in HTML
< img sr c ="/ image . png " al t =" Random Image ">
r ela t i v e ur l
B r Tag
Used t o add ne xt line ( line br eak s ) t o y o ur
page
<br>
Bold , I t alic & Unde r line Tags
Used t o highligh t t e xt in y o ur page
<hr>
S u b s c r ip t & S u pe rs c r ip t Tag
Used t o di s pla y a ho r i z on t al ru le r , us ed t o s epa r a t e con t en t
H 2O
< su p > su pe rs c r ip t </ su p >
n
A +B
Pre
Tag
Used t o display t e xt as i t is ( w i t ho ut ignoring spaces & ne xt
line)
<header>
<main>
< foo t e r >
Inside Main
Tag
Section Tag Fo r a section on y o ur page
<section>
for new t ab
<a h r ef =" h tt p s :// google . com "> <img sr c =" link ">
</ a >
clickable
pic
Revisiting Image
Tag
<img sr c =" link " heigh t=50px
>
s e t height
s e t w id t h
Div
Tag
Div is a container used for o t he r HTML
elements
< a rt icle > < figcapt ion> < noscr ipt >
unordered or der e
d
< u l> < ol>
<li> Apple </ li > <li> Apple </ li >
S tu den t Da t a
Name Roll No
Shr adha 1664
thead & tbod y in
Tables
<t head > t o wr ap table
head
Dat a
Shr adha 1664
Aman 1890
Fo r m in
HTML
Fo r m s a r e used t o collect da t a from t he
us e r
<form>
</ fo r m >
Action in
Fo r m
Action a ttr ib ut e is used t o define w ha t action needs t o
be performed when a form is su bmi tt ed
< input ty pe=" r adio" v alu e=" class X " name=" class "
id=" id1 " >
< input ty pe=" r adio" v alu e=" class X " name=" class "
id=" id2 " >
</ di v >
</ di v >
Checkbox
< input ty pe=" checkbox " v alu e=" class X " name=" class "
id=" id1 " >
< input ty pe=" checkbox " v alu e=" class X " name=" class "
id=" id2 " >
</ t e xt a r ea >
Select
Attributes
- controls
- height
- width
- loop
- autoplay
All the v e ry best in y o ur
f utur e journey :)