\apte, . 4
, lists and Images
in HTML 5
Thac's not too difficult
je See. you have learn the
sics of HTML in clas 7, Let
you altcle more
about ic today.
to create an HTML document
In Class 7, you have learnt how
view it in a web browser.
ina text editor such as Notepad and
You had also learnt about some basic HTML tags and
attributes using Cascading Style Sheets.
arn how to create different types of
In this chapter, you will le
5 in an HTML document.
lists and how to insert image:
Let us frst ecall the properties of the HTML elements as discussed in class 7 (Table 3),
Table 3.1 HTML Properties
colour name, hexadecimal colour
value, RGB colour values
Colour | Specifies the
| foreground colour
| of the text el:
51
Scanned with CamSeannertextalign
Tine-height
text-decoration
| text-shadow
pis ]
Specifies the |
| horizontal
| alignment of text or
a block of text
Specifies the
| distance between
| two lines
Specifies the
decorations that are
| added to the text—
underlining, line
through, etc.
Specifies a shadow
effect for the text
| text-transform
Controls the
capitalisation of
text
Specifies all the
font properties in
one declaration
font names
Specifies the size of |
a font
Specifies the style
of the font
| left, right, centre, justify
Specifies alist of | |
normal (default), number (a
at will be multiplied
number th
| t size to set the
with the current font
line height), length (a fixed line
height in px, pt, cm), OF percentage
value (a line height in percentage
of current value)
none (default—defines normal text),
underline (defines a line below the |
text), overline (defines a line above |
the text), or line-through (defines a
line through the text)
None, colour name, or colour
value !
none (default — the text appears as
itis), capitalize (the first character
of each word in uppercase),
uppercase (all characters are in
uppercase), or lowercase (all
characters are in lowercase)
‘font-style font-variant font-size
font-family’
xx-small, x-small, small, medium
(default) large, x-large, xx-large,
larger, smaller, value or percentage
u
normal, italic, oblique
|
|
| text-align: righ
line-height: not
line-height: 8p
text-decoration:
overline
text-decoration:
underline
| text-shadow: 2px 2px
green
| text-transform:
|
uppercase
font: bold 18px arial
font-family: arial
font-style: italic
font-style: obliquemargin
margin-bottom
margin-left
margin-right
margin-top
border
| border-width
border-style
border-Colour
| background-
| Colour
Sets all the margin
properties in one
declaration
4
| margin-bottom; margin-left;
| margin-right; margin-top
| margin: 10px 5px 5px
| 10px
Sets the fixed
Length margin-bottom: 1cm
Default value is Opx |
an element in px, |
pt, cm, etc.
bottom margin of
Sets the left margin Length margin-left: 2cm
of an element in
PX, pt, cm, ete,
Default value is Opx
length
Default value is Opx
Sets the right-margin
| of an element in px,
pt, cm, etc.
——
Sets the top margin | length
ofanelement in Default value is Opx
| Px, pt, cm, etc.
Sets all the border border-width, border-style, border-
properties in one | colour
| declaration
Specifies the width | thin, medium (default)
| of the border | thick, length (you can define the
| thickness of the border)
Specifies the style | none (no borden), dotted, dashed,
of the border | solid, double, groove, ridge, inset,
or outset
Specifies the colour | colour name, or colour value
of the border
Specifies the
background Colour
colour name/colour value/
transparent ;
border: solid 3px green.ted) list
Creating a list ‘An unordered (or bulleted) li
Working with list Properties
Using the list properties, you can specify the style and position of the list-tem marker. Various list
properties that are common to both ordered and unordered lists are given in Table 3.2:
List properties am
Property Description Vi
list-style | This is used to set all list | list-style-position; list-
| properties in one declaration | style-image; liststyle-type
liststyle-position | Specifies the position of the | inside
list-item marker ___ outside
Note: Another property called the 1ist-style-type property is used to
list-item marker and has different values for ordered and unordered lists.
property under and tags.
Unordered List Tag
‘An unordered list is used for items in which the ordering of items is n
unordered list is also called a bulleted list.
tag.
The bullet style can be added to the list items by using the
Table 3.3. ee
Here a circle specifies a hollow bullet; a disc specifies a
‘pecfes a square bullet.
The lst p ia for an unordered list are given in Tal
eet E
Scanned with CamScannerOrdered list Tag
An ordered list defines a list of items in which the order of
items matters. An ordered list is also called a numbered list.
The list items are enclosed within and