Assignment - 1 Webtech
Assignment - 1 Webtech
60ESTLON=1
Ekplain Hhe prpae HIML o JAs role in web
dauelopmant
ANScOE.R
HIML
HTML sand.s fox Hypen text Mcukup
languaga
HTML is a programming languago tad
ddin the shsuchahe and ayou o caeb pages
Nalouas content casates to speidy hiadngs
pancgiphs,imogesylinta Qmn) othen elements
PORPOSE OE HML.
HTML is wd to cou ate and structw
conteot gon thi woeb
HIML ls uàLd to disian the basic
hyout cnd tonmating al wcb pages
HTM s uard to dovalop gem in
twsing csS ano dova Sconipl
HoLE O£ HTML IN WEB
DEVELOPMEND
ML helbsweb divelop ons
taebsite hat 0u coede
easy to wa an
60GSON- 2ND
ANSOER
STEOCTUR6 OE AN
HIML DocuMENT
An HtML Documort is mcun lå cividid intwo
too pauths
HEAD: Ths cortains the infomaion aboud
tal HTM doumont
For example
thi tlo o t pages
vension HIMLMeta Dta etc
BODY: This contains eueatthg sou taant to
dIsplay on thl tweb page
<!DoCTYpe ntml>
<htm
<heod
<HHe> oge tie </HHe>
</heao
bodg>
<hi) hacolins contontK/h
<p groph content </p>
</6cdy>
Shtm
DUsTLON
tUite an HIML code sniopet to canate
an nduNed list(o)oHh tt ist
l4oms(LI)
ANSOGR
<htm
<head
<tiHe> Lista) ElemantsHe)
<lhod
<body
<A SoETGOARE COMPANLES </h3
Kdi) Micnosoft Caap:&i
<ui) Oacle Coap
<li) SAPSE </
<lo
<body
<(htm
60cSTLON- RTM
ANSOER
HYPERLINK JN HIML
o cocate a hypan l'in k th html you
can s the hoo atfoibte
For exomple
60cSTION- 5TH
Explain thidifena between TML
tags and otibates Gaive Qn example
each.
ANSOER
DIEEERENCE Bl HIM, tags and
atibudes
HTML tags
oLd to hol ho HTML
HIML togs
elemont
Ons
<i) italie
<u) 'ndunlin
<bheuak t ins
<ha fatting lin ocMGSs hs webpage
<htm
<had)
<UHe Heady </HHe)
<heBAeid'ng </h
<h6 Hec K/hs
<iK<u)Anshu</u</>
<Zhtml
HTML Attibutes -
AlL htmn elemnts can hVe attibutes
" Ataibudes prcvidu aoakoral inonmoten
about elemnts or tags
DATE
PAGE
Jyntax
Klorm action= page tink)l tange Lblankl
matha = get/os
achion acton otttbute spocities th oRL
mothod tenmdaiasoll
gpeiles heu
howth
Common muthod
TE
iAGE
6UESTION- ZNTH
Descenibe the semant'c HTMLS elemsn ts
davelopmant
Ansoeh
SEMANTC HTML5
ELEMENTS
60ESTION-gTH
exteh a
Uate HTMLCod to embed cn
VidLo usng Heitrcim element
ANSOER
STEPS TO EMBED AN EXTERNA ) VDEO -
Cutoplay jmudl
maks language
tat dsign
sheets stye codi
nq cas stonds
or CSS
Role
its ond CSS
ANSwER
MML dionE
om is
iHHaco
dosjon. web in ole its Cnod CSS Define
qNTHSTION- bUE
KIhtml
Sp> playenMutmud'a <e
</foamu so ht
haia
oo?
frûmeb0Tdn=o"
toid
yldas/4-mpu'" Snc= iaam
<body
</headS
</tiHe yooamu by
Viduo Html <HHe
<head
<htm
Syntax-/Cod1
JtAGE
DATE
Acoebsite bak mone appe oliey tan yust
phin on unirspirn piecs o text
Css deinitdly acts as a backboru o ta
enhan c the
Applyng styles to Ha tt ML elements.
ss cantals uisual propeutes such ad aos,onts,
manginS, poadling , bordus;buckgounds and mere.
Oaito CS S ca to choge he ont siz
pananaph (Peemn s) oltio
all
speaic <aiv> cnlaunen.
AN SOER
-font-sizei l6pxj
G0ESTION -NTH
ANSOER -
Width and Height: The total width and height of an element are
calculated by adding the content width/height, padding, border, and
margin. For example, if you set an element's width to 200px, and it
has 10px of padding, a 2px border, and 20px of margin, the actual
space it occupies on the web page will be 232px (200px +10px +
2px + 20px).
Spacing: The padding and margin control the spacing between the
element's content, other elements, and the element's border.
Padding creates space inside the element, while margin creates
space outside the element.
Border: The border can be used to visually separate elements or
provide a visual outline to the element.
Understanding the CSS box model is crucial for web layout and
design because it allows you tocontrol how elements are positioned,
sized, and spaced on a web page. Properly adjusting padding and
margins can help create aesthetically pleasing and well-structured
layouts.
How can you center-align a block-level element
horizontally using CSS?
Provide a CSS rule for this.
. Center {
margin: 0 auto;
1. The 'margin` property is set with two values: 0° for the top and
bottom margins, and `auto' for the left and right margins.
2. Setting the left and right margins to "auto` will horizontally center
align the block-level element within its parent container.
Write CSS code to create a hover effect that changes the
background color of
a button when the cursor hovers over it.
You can change the text color of all '<h2> headings to blue using the
following CSS code:
h2
color: blue:
This CSS rule selects all '<h2> elements in your HTML document
and sets their text color to blue. You can include this CSS code within
a '<style> tag in the '<head> section of your HTML document, or
youcan link to an external CSS file that contains this rule.
Explain the purpose of CSS pseudo-classes and provide an
example of using
the :hover pseudo-class.