This section of text willbe 100 pixels lon
This will give you the following:
This section of text will be 100 pixels long
15.11.2, HEIGHT PROPERTY
The height property lets you give a section a specific height. If you set the
height at 100 pixels, it should cut off the text after reaching a vertical length of
100 pixels, right? Well, it does....but you won’t see it because by default
everything is visible......
|
Here you have the height set at 100, but even with all the line breaks,
everything still shows up without a cut off:
15.11.3. OVERFLOW PROPERTY
aa 2 a property that lets us change what happens when something goes
‘yond our set width and height. The possible values are auto, scroll, hidde*
and visible. | am goin; e : w
tes ig to set it to “hidden”, i beyond
100 pixel cut off does not show up: ce nae
This will have a solid border. |
And you will get a long, solid border
[This will have a solid border. |
Let’s use the width property we learned earlier in this section
This will have a double
border.
You get a nice little double border:
| This will have a double border.
.Border-Width
you decide how thin or thick your border will be. The possible values
sorder-width can take are number of pixels, thin, medium and thick. If
e border-width to “thin”, you will get a thin border:15.14
15.13.4, Margin-Bottom
Same as above, but defines the bottom margin. The default is 0.
15.14, PADDING
15.141, Padding-Left
“The padding properties are much like the “cellpadding” property of a table,
‘except these let you define the padding for the left, right, top, and bottom
individually rather than all at once, The possible values that it can take are
“number of pixels, percentage value and auto. Here is an example of the
padding-left property :
THIS CHANGES EACH LETTER TO LOWERCASE.
The above code will produce the following output:
.
Th
15.20. LINE-HEIGHT “
Possible Valu “
normal
number of pixels
percentage
This lets you change the amount of space between lines of text. The possible
Values that line-height property can take are normal, number of pixels and
percentage. If you want each line to be 30 pixels apart, you could write ths:
_|
This text is indented
30 pixels on the L
‘And this is what you get:
. ; =
indented 30 pixels on the first line.
40.22. FONT-FAMILY L
‘The font-family property defines the type of font shown on the screen The
default name is whatever the browser uses normally, which tends to be Times {
‘New Roman (name of the font). If you want to change ‘the font to Arial, for i‘.
instance, you would write this:
The font for this section is Arial.
}
+
7
And you would get the text with an Arial font:
The font for this section is Arial.
‘omputer for this to work. So
The viewer must have the font jnstalled on their c
stick with the most common fonts for the most part.
f the font shown on the soreen- ‘The default
entage OF number of pixels. TO change
wuld do this:
15.22.1 Font-Size
The font-size property defines size 0
is medium but it can take values 1” perc
your font to a size of 40 pixels, you Wo3
1818
Computer Applicatio
And get thist Biase
The font is 40 pixels in size.
15.22.2 Font-Style
It might be simpler to just use the
tag, but since the propert
| take normal, italics, oblique as its values. For example:
ne
y exists, it can
font-style:italic">The font is italic.
code results into following:
is italic.
Font-Variant
ly use I see for this one so far is that it lets you write in small caps if
to, The default is normal. If you want to write in small caps, do this:
Jets you control how bold the font is. The values it can take are
‘bolder, lighter and any value as a multiple of hundred from 100 to
er values (100-900) don’t seem to have any difference from one
how bold you can be!
OR
t property we'll go over is the color property. I probably have shows
already, but just in case I didn’t.
color property changes the forground color of a section, which is wv=l?
30, to change the color of some text:
s plain
and this makes me think15.19
Ce
The eee
it would gi
15.24, BACKGROUND-COLOR
This property will let you add a back!
can add it to text like this:
ground color behind most anything, You
ZEPAN style="background-color:ye|
SPAN>
‘Also, you can use this in tables:
AAAGH! Pumpkin Background!
5,
You can change the background colour of a form box’ by using the following code.
|
Now try filling out THIS form.........
UTED Ee reevalues:
‘thin
‘medium
thick
Separate values bya _| div { border-top:2px solid
space in the following | green; }
order (those that are | div { border-top:thick double
not defined will use | #00FFO0; }
inherited or default15.23
ects -s
Cascading Style SHC _— -
Cas iB ae div { border-right-width:2px; }
border-right | Me right border vittea div { border-right-width:thin; }
width | thin |
| ‘medium
| =I jged as shorthand | Separate values by a | dv bordertight2px solid
border-right | property to set all the |) space in the toning peal a a
|| border-right properties | order (those that are | div { border-right:thick double |
at once, || not defined will use | #OOFFOO; )
| | inherited or default
| | inital values)
| border-right-width
border-right-style
| border-right-color
iv { border-bottom |
Declares the color of || Valid color names,
| the bottom border. | RGB values, | colorigreen; }
| hexidecimal notation, | div { border-bottom
or the predefined value | color:#OOFFOO; }
transparent. |
Tporder-bottom- | Declares the style of | None [av ( border-bottom-
style the bottom border. | stylesolid;) |
| | div { border-bottom-style:inset;)
| \ |
| ‘|
'
| |
the width of || Lengths or the |
Porder-bottom- || Declares the width of) Length
ae ; lowing predefined |
width tie bottom border. os: | swicththin:) |
| thin |
|| medium, :
thick
Sepacte vanes oa |
in the following " a
ser (those that are | 41V { border-bottom: thick
fot defined will use | double +H00FFOO; }
jnherited or default
initial values): | |
sic one |
porder-bottom-style |
porder-bottom-colorues Computer Application «I
|[vorderlet-syle | Declares the syle of | None diy { border-lef-syte oli, |
the left border. div { border-left-style-inset, }
orthe div { border-teft-width 2px, }
fatewing predefined | dv { border-leftwih hin.)
values |
thin
medium
thick
‘Separate values by div { border-left-2px solid
to setall the | space in the following | green, }
ft properties | order (those that are | div { border-teftthick double
atonce, not defined will use | HOOFFOO; }
inherited or default
Valid color names, div { border-color:green red
RGB values, olive; }
|| hexidecimal notation, { border-color:green; }
| orthe predefined value | div { border-color‘green red; )
transparent. div { border-color:green red
Separate the color for | blue; }
each border by a space,
|| declaring the colors for
|| the borders in the
| following order:
border-top-color
border-right-color
|| border-bottom-color
border-left-color
Undeclared values
work as further
shorthand notation. If
‘only one color value is
declared, all four
|| borders will use that
color. If two colors are
declared, the top and
bottom borders will
se the first color
while the right and left
borders will use the
second color. If three
‘colors are declared, the
top border will use the | |
first color, the right |
and left borders will
use the- r .
Cascading SOY ner 1 b0X tl )
——T peel oat to the le or | | |
aie offer content OF
rigtiper it should not be |
foated at al
iv (
div {visbilty:hidden; }
1
‘Declares the distance that div (top: 5px; } |
the top content edge of av |
the clement is offset om —
below the top edge of its |
containing block. The | =
position property of the | |
element must also be set |
| to a value other than
static. i
he ] |
Declares the distance that || Lengths, | div (right:15px; } fo
the right content edge of div (right: 2% } |
| the element is offset to
the left of the right edge
Declares the
| the left content edge of
the element is offset toTaepesandthe | Matelnmaion
| predefined valve
igus
Fecsarat [Desa thefintvarant orm
(58 Lie Popes
“Powsibe Vales
ample
a (isan
tise
za eee
| ecaaeang 200
beeen)
ere
mae
|Srepet
|e
\eoem
Sieosentc
\{sskoe
tien
| apes
SentMargin Properties
[Proper | Deserinon
earinop | De er
‘main boom | Decne he
Declares the lft
(rela alte
(55 Maren Properties
area he ia [Lang pecenage ante |
“Leng. cee a he
| Lengths, percentages andthe
edie vale sat
Separate values by aspacen he
{owing ede (ose ta a nt
fed il we heied deta
margin popes |i vale)
reins
mepitoror
map
Cece vloes woe srr
‘Sortandnton ely oe length
le i dele al fur mais wll,
{eat length two lenis are
declared, the top and Doom mains
hi as the rating whe height
Eadie margins wl se he second
Engh te ngs ae cared th |
topmgn whe ir ent, he
ip nd eR margins wil ws he
Setnd length dhe bo rarpn
ia te rd length
is { masinion S|
i (ragin13)
dv | maging)
{mare
iv {marge 5)
(arg boo 19)
3 roe
30S
———eEeE—_—__
Cac,
mt Ie Shey
Outtine Properties
3 rm Peserieton
ess
lars the width of the [Lengths rhe towing
=,
ae
padding othe | vate nt.
Semen.
Fah pang for
|tecemest |
Leng
vale at
| pring boas | Desi te
| rotor ping
forte clement
‘Decree let | Lens, percents
| padding forthe | value auto
pang
[Pate eee
fs
ee
| |i
outline [Used asa shorthand | Separate values by a space in
eeerotoriette — |sSeiocayose tera
ele pris [sose ative
ae ete tia
[bedastictop [Langs yeromaess ade pest |v
tangs [Dern te [ea oor bredleh nattiote Lor
mate
Fe. | Tee)
Detar uinc: [URL ned pac [apo
fepayaterms [cc pie
a l
teceranfomm | Dols te capitalization |
—
ee
[av (ue "
| ansfommuppereass
| iv {text
transformlowereass} |
pacer
RL rand he pnd | vee
ee Ween
fae
Steriund poco [URL ve and pected [a wow
stot asst |e none Sparen | nse)
vee yaspnde wen” [ay {cored om
eee
ar
tetra e elnl
ost bh
[itr tr
Dela clean [Angle alos deer
ofasond josewee ispe er
‘roar fhe (ore
| Eating reine vale:
Computer Application - 11
cars Becomes [Tien reo) ge (teat Si)
ror (sires.
div ( pitch: 120H; |
|
ete20%s) |
ie ede cr 2
[So [omer haere
oss av arma | i
. Saez eimomos” [iam =
e Tighervalees indent a loud
ee _ |
fllowed by dv (play
frre [eer ae | eee isaac.
Sepia wile be
spoken
‘owe teywords, |
searicdbyscs |
peat
Rhema one of he
[none
‘(ly
my)
repeat)
Se (pleyduringnone:) |
Declares the ices
ete vein
[spoken ot
eared
(See
janceneag
[eerie et |
a
(tes)
‘iy (retess0
ay (apne)
poco)
fh (speak beaderoes)
1 (spakhenderalvos
}
ai (speak
mera igs
avs
[iv (speak
ace)
pancation
Sie (spake
punetstion 0
Explain all the physical style elements in HTML with examples,
(May 2008)
‘What are cascading style sheets? Explain al types of cascading syle
sheets using suitable HTML code {un 2006)
‘What are the various types of stylesheets available in computer world?
Which is used for web development?
‘What is the difference between style attribute and syle element
Explain using examples.
Give an example to explain how class attribute is used in sh
Give an example to explain how ID attribute is used in syle el
7. Give examples to explain the various propeties to change
text.
8. Give examples to explain the vaious prop
border.
9.
Give examples to explain the various properties
of the text.