|
|
HTML fundamentals
CHAPTER #
2
Incorporating
Graphical elements
Attributes
- Attributes are
the information contained in the Tag which controls the tag
output.
- There attributes,
which must be assigned a value for the tag to function.
- Some Attributes
are optional. If no value is assigned, it will assume the
default value.
- The above tag
can be modified by assigning values to the attributes.
Adding Horizontal
Ruling Line
| ATTRIBUTE |
VALUE |
RESULT |
| ALIGN |
|
- Aligns the
Ruling line with respects to the window.
|
| NOSHADE |
|
- The presence
of this attribute will result in no shade to the Ruling
line
|
| SIZE |
|
- The thickness
of the Ruling line will be X pixels (The size of the pixel
is relative and depends on the screen resolution)
|
| WIDTH |
|
- Sets the length
of the Ruling line within the window.
- The length
will be set at Y pixels if the value assigned is in Pixels.
- The length
will be set to Z % of
- The window
width.(In this case the the length varies with the
window size.
- Or the
table if the Rule is inside a table
|
-
<HR ALIGN="CENTER"
NOSHADE SIZE="2" WIDTH="50%">
will yield as below
Incorporating IMAGES
-
<IMG SRC="URL
of the image file" OPTIONAL ATTRIBUTE VALUES >
- The above code will
display the image located at the URL stated in the browser according
to the assigned attribute values.
- Currently there
are only two types of graphical formats are available to be
used in HTML documents. They are
- .gif - Graphic
Interchange Format (GIF)
- .jpg - Joint
Photographic Experts Groups (JPEG)
| SRC |
- Required tag
which directs the browser to the source of the image.
|
| ALT |
- The Value
assigned (Normally a short description) to this Attribute
will be displayed in image location when the file is getting
downloaded.
- If by any
chance the image is not downloaded ( e.g. - if the browser
is set not to download graphics), the "ATL" value will
be a good information.
- When the mouse
moves over to the picture the value assigned will pop
up.
|
| WIDTH
& HEIGHT |
- These are
assigned values(in pixels), to re-size the image. Re-sizing
is required
- To reduce
the file size and hence the down load time.
- To layout
properly inside the page.
- The while
re-sizing the width to height ratio should be maintained
so that the image is not distorted.
- This values
will help the browser to reserve space for the image and
down load ramming texts if any. If no values assigned,
the browser will wait for the image to be download completely
before it can download the text.
|
Page colors and Background
- Colors are specified
in terms of RGB values
| |
RED |
GREEN |
BLUE |
| # |
F |
F |
F |
F |
F |
F |
- The above shows
the color scheme. It is specified with a hexadecimal number.
A purticular color is specified by combining deferent values
of Red, Green & Blue.
<BODY>
- The Body tag sets
all properties of an HTML page.
|
Attribute
|
Default
Value
|
Description
|
| BGCOLOR |
#FFFFFF
(WHITE)
|
- This attribute
value determines the page background color.
|
| TEXT |
#000000
(BLACK)
|
- This attribute
value decides the text colors other than the links.
|
| ALINK |
#0000FF
(BLUE)
|
- This attribute
value decides the color of the text in the link when the
mouse click and hold time.
|
| LINK |
#0000FF
(BLUE)
|
- This attribute
value decides the color of the text in the link.
|
| VLINK |
|
- This attribute
value decides the color of the text in the visited links.
|
| BACKGROUND |
NONE
|
- Value of this
attribute (the URL of a graphical file) determines which
image is to be tiled as background of the page.
- This attribute
overrides the BGCOLOR attribute.
|
<FONT>
- FONT tag allows
to change the size, color, type face enclosed by it.
|
Attribute
|
Value
to set
|
Description |
| SIZE |
1
through 7
|
Value
1 is smallest and & the largest |
|
-3,-2,-1
|
Smaller
than the default size |
|
1,2,3
|
Bigger
than the default size. |
| COLOR |
Any
hex number
|
|
| FACE |
Any
available font face
|
If
the font face set is not available at the user side then it
while displayed in normal default font face. |
|
|