SlideShare une entreprise Scribd logo
1  sur  102
WEB TECHNOLOGY
HTML-1
DR. JYOTI YADAV
HYPERTEXT MARKUP LANGUAGE
• HTML stands for Hypertext Markup Language.
• HTML is the standard markup language for creating Web pages
• HTML describes the structure of a Web page
• HTML consists of a series of elements
• HTML elements tell the browser how to display the content
• HTML elements label pieces of content such as "this is a heading",
"this is a paragraph", "this is a link", etc.
3
HTML: HYPERTEXT MARKUP LANGUAGE
• HTML documents are simply text documents with a specific
form
– Documents comprised of content and markup tags
– Content: actual information being conveyed
– The markup tags tell the Web browser how to display the page
– An HTML file must have an htm or html file extension
– An HTML file can be created using a simple text editor
Features of HTML:
•It is easy to learn and easy to use.
•It is platform independent.
•Images, video and audio can be added to a web page.
•Hypertext can be added to text.
•It is a markup language.
Why learn HTML?
•It is a simple markup language. Its implementation is easy.
•It is used to create a website.
•Helps in developing fundamentals about web programming.
•Boost professional career.
Advantages:
•HTML is used to build a websites.
•It is supported by all browsers.
•It can be integrated with other languages like CSS, JavaScript etc.
Disadvantages:
•HTML can create only static webpages so for dynamic web page other languages have to be used.
•Large amount of code has to be written to create a simple web page.
•Security feature is not good.
5
HTML TAGS
• HTML tags are used to mark-up HTML elements
– Surrounded by angle brackets < and >
– HTML tags normally come in pairs, like <tagname> (start tag) and
</tagname> (end tag)
– The text between the start and end tags is the element content
– Not case-sensitive
– Follow the latest web standards:
• Use lowercase tags
6
TAG ATTRIBUTES
• Tags can have attributes that provide additional
information to an HTML element
– Attributes always come in name/value pairs like: name=“value”
– Attributes are always specified in the start tag
– Attribute values should always be enclosed in quotes. Double
quotes are most common.
– Also case-insensitive: however, lowercase is recommended
– <tagname a1=“v1” a2=“v2”></tagname>
– For example, <table border=“0”> is a start tag that defines a table
that has no borders
7
HTML DOCUMENT STRUCTURE
• Entire document enclosed within <html> and </html> tags
• Two subparts:
– Head
• Enclosed within <head> and </head>
• Within the head, more tags can be used to specify title of the page, meta-
information, etc.
– Body
• Enclosed within <body> and </body>
• Within the body, content is to be displayed
• Other tags can be embedded in the body
ANATOMY OF HTML
ANATOMY OF HTML
Note: Simple attribute values that don't contain ASCII
whitespace (or any of the characters " ' ` = < > ) can
remain unquoted, but it is recommended that you
quote all attribute values, as it makes the code more
consistent and understandable.
ANATOMY OF THE HTML DOCUMENT
11
OUR FIRST EXAMPLE
12
OUR FIRST EXAMPLE
A SIMPLE HTML DOCUMENT
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
WHAT IS AN HTML ELEMENT
An HTML element is defined by a start tag, some content, and
an end tag:
<tagname>Content goes here...</tagname>
The HTML element is everything from the start tag to the end
tag:
<h1>My First Heading</h1>
<p>My first paragraph.</p>
15
HTML HEADINGS
<html>
<head>
<title>Computer Science</title>
</head>
<body>
<h1>Hello Computer Science</h1>
<h2>Hello Computer Science</h2>
<h3>Hello Computer Science</h3>
<h4>Hello Computer Science</h4>
<h5>Hello Computer Science</h5>
<h6>Hello Computer Science</h6>
</body>
</html>
16
HTML PARAGRAPHS
<html>
<head>
<title>International University</title>
</head>
<body>
<h1>Hello International University</h1>
<p>
A Computer Science portal for IU<br>
A Computer Science portal for IU<br>
A Computer Science portal for IU<br>
</p>
</body>
</html>
NESTING ELEMENTS
You can put elements inside other elements too — this is
called nesting. If we wanted to state that our cat is very grumpy, we
could wrap the word "very" in a <strong> element, which means that
the word is to be strongly emphasized:
You do however need to make sure that your elements are properly nested. In the
example above, we opened the <p> element first, then
the <strong> element; therefore, we have to close the <strong> element first, then
the <p> element. The following is incorrect:
EMPTY ELEMENTS
Some elements have no content and are called empty
elements. Take the <img> element that we already have in
our HTML page:
This contains two attributes, but there is no closing </img> tag and
no inner content. This is because an image element doesn't wrap
content to affect it. Its purpose is to embed an image in the HTML
page in the place it appears.
MARKING UP THE TEXT
MARKING UP THE TEXT
MARKING UP THE TEXT
A lot of the web's content is lists and HTML has special elements for
these. Marking up lists always consists of at least 2 elements. The
most common list types are ordered and unordered lists:
1.Unordered lists are for lists where the order of the items doesn't
matter, such as a shopping list. These are wrapped in
a <ul> element.
2.Ordered lists are for lists where the order of the items does
matter, such as a recipe. These are wrapped in an <ol> element.
Each item inside the lists is put inside an <li> (list item) element.
EXAMPLE OF LISTS
LINKS
FINAL WEBPAGE
WEB BROWSER
26
HTML LAYOUT
• One common way is to use HTML tables to format the layout
of an HTML page
– The trick is to use a table without borders, and maybe a little extra
cell-padding
• Other tips:
– Keep screen resolution in mind
– Use color to define spaces
– Align your images
– Balance the graphics and text on a page
– Think about text width – scan length 7 – 11 words
– Centering text is inadvisable
27
HTML FRAMES
• HTML frames are a means of having several browser
windows open within a single larger window
• Each HTML document is called a frame
• Disadvantages:
–Must keep track of more HTML documents
–Difficult to print the entire page
COLOR CODES
Colors are set using “RGB” color codes, which are, represented as
hexadecimal values. Each 2-digit section of the code represents
the amount, in sequence, of red, green or blue that forms the
color. For example, a RGB value with 00 as the first two digits has
no red in the color.
28
MAIN COLOURS
29
RGB COLOUR MODEL
30
16 BASIC COLORS
31
1. WHITE
2. BLACK
3. RED
4. GREEN
5. BLUE
6. MAGENTA
7. CYAN
8. YELLOW
9. AQUAMARINE
10. BAKER’S CHOCOLATE
11. VIOLET
12. BRASS
13. COPPER
14. PINK
15. ORANGE
1. #FFFFFF
1. #FFFFFF
2. #000000
3. #FF0000
4. #00FF00
5. #0000FF
6. #FF00FF
7. #00FFFF
8. #FFFF00
9. #70DB93
10. #5C3317
11. #9F5F9F
12. #B5A642
13. #B87333
14. #FF6EC7
15. #FF7F00
32
Color Codes
THE BODY ELEMENT
The BODY element of a web page is an important element in regards
to the page’s appearance. Here are the attributes of the BODY tag to
control all the levels:
TEXT="#RRGGBB" to change the color of all the text on the page
(full page text color.)
 This element contains information about the page’s background
color, the background image, as well as the text and link colors.
33
BACKGROUND COLOR
 It is very common to see web pages with their background
color set to white or some other colors.
 To set your document’s background color, you need to edit
the <BODY> element by adding the BGCOLOR attribute.
The following example will display a document with a
white background color:
<BODY BGCOLOR=“#FFFFFF”></BODY>
34
TEXT COLOR
The TEXT attribute is used to control the color of all the
normal text in the document. The default color for text
is black. The TEXT attribute would be added as follows:
<BODY BGCOLOR=“#FFFFFF”
TEXT=“#FF0000”></BODY>
In this example the document’s page
color is white and the text would be red.
35
LINK, VLINK, AND ALINK
These attributes control the colors of the different link states:
1. LINK – initial appearance – default = Blue.
2. VLINK – visited link – default = Purple.
3. ALINK –active link being clicked–default= Yellow.
The Format for setting these attributes is:
<BODY BGCOLOR=“#FFFFFF” TEXT=“#FF0000” LINK=“#0000FF”
VLINK=“#FF00FF”
ALINK=“FFFF00”> </BODY>
36
USING IMAGE BACKGROUND
 The BODY element also gives you ability of setting an image as the
document’s background.
 An example of a background image’s HTML code is as follows:
<BODY BACKGROUND=“hi.gif” BGCOLOR=“#FFFFFF”></BODY>
37
HEADINGS, PARAGRAPHS, BREAKS & HORIZONTAL RULES
Adding headings to your page, insert paragraphs, add some
breaks, and add horizontal rules.
Objectives
Upon completing this section, you should be able to
1. List and describe the different Heading elements.
2. Use Paragraphs to add text to a document.
3. Insert breaks where necessary.
4. Add a Horizontal Rule.
38
HEADINGS, <HX> </HX>
Inside the BODY element, heading elements H1 through
H6 are generally used for major divisions of the
document. Headings are permitted to appear in any
order, but you will obtain the best results when your
documents are displayed in a browser if you follow these
guidelines:
H1: should be used as the highest level of heading, H2 as
the next highest, and so forth.
You should not skip heading levels: e.g., an H3 should not
appear after an H1, unless there is an H2 between them.
39
HEADINGS, <HX> </HX>
40
<HTML>
<HEAD>
<TITLE> Example
Page</TITLE>
</HEAD>
<BODY>
<H1> Heading 1 </H1>
<H2> Heading 2 </H2>
<H3> Heading 3 </H3>
<H4> Heading 4 </H4>
<H5> Heading 5 </H5>
<H6> Heading 6 </H6>
</BODY>
</HTML>
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
PARAGRAPHS, <P> </P>
Paragraphs allow you to add text to a document in such a
way that it will automatically adjust the end of line to
suite the window size of the browser in which it is being
displayed. Each line of text will stretch the entire length
of the window.
41
PARAGRAPHS, <P> </P>
<HTML><HEAD>
<TITLE> Example Page</TITLE>
</HEAD>
<BODY></H1> Heading 1 </H1>
<P> Paragraph 1, ….</P>
<H2> Heading 2 </H2>
<P> Paragraph 2, ….</P>
<H3> Heading 3 </H3>
<P> Paragraph 3, ….</P>
<H4> Heading 4 </H4>
<P> Paragraph 4, ….</P>
<H5> Heading 5 </H5>
<P> Paragraph 5, ….</P>
<H6> Heading 6</H6>
<P> Paragraph 6, ….</P>
</BODY></HTML>
Heading 1
Paragraph 1,….
Heading 2
Paragraph 2,….
Heading 3
Paragraph 3,….
Heading 4
Paragraph 4,….
Heading 5
Paragraph 5,….
Heading 6
Paragraph 6,….
42
BREAK, <BR>
Line breaks allow you to decide where the text
will break on a line or continue to the end of the
window.
A <BR> is an empty Element, meaning that it may
contain attributes but it does not contain content.
The <BR> element does not have a closing tag.
43
BREAK, <BR>
<HTML>
<HEAD>
<TITLE> Example Page</TITLE>
</HEAD>
<BODY>
<H1> Heading 1 </H1>
<P>Paragraph 1, <BR>
Line 2 <BR> Line 3 <BR>….
</P>
</BODY>
</HTML>
Heading 1
Paragraph 1,….
Line 2
Line 3
….
44
HORIZONTAL RULE, <HR>
The <HR> element causes the browser to display a
horizontal line (rule) in your document.
<HR> does not use a closing tag, </HR>.
45
HORIZONTAL RULE, <HR>
Attribute Description
Default
Value
SIZE Height of the rule in pixels 2 pixels
WIDTH
Width of the rule in pixels or percentage
of screen width
100%
NOSHADE
Draw the rule with a flat look instead of
a 3D look
Not set
(3D look)
ALIGN Aligns the line (Left, Center, Right) Center
COLOR Sets a color for the rule Not set
46
HORIZONTAL RULE, <HR>
<HTML>
<HEAD>
<TITLE> Example Page</TITLE>
</HEAD>
<BODY>
<H1> Heading 1 </H1>
<P>Paragraph 1, <BR>
Line 2 <BR>
<HR>Line 3 <BR>
</P>
</BODY>
</HTML>
Heading 1
Paragraph 1,….
Line 2
___________________________
Line 3
47
CHARACTER FORMATTING
How to enhance your page with Bold, Italics, and other character
formatting options.
Objectives
Upon completing this section, you should be able to
1. Change the color and size of your text.
2. Use Common Character Formatting Elements.
3. Align your text.
4. Add special characters.
5. Use other character formatting elements.
48
BOLD, ITALIC AND OTHER CHARACTER
FORMATTING ELEMENTS
 <FONT SIZE=“+2”> Two sizes bigger</FONT>
 The size attribute can be set as an absolute value from 1 to 7 or as a
relative value using the “+” or “-” sign. Normal text size is 3 (from -2 to +4).
 <B> Bold </B>
 <I> Italic </I>
 <U> Underline </U>
 Color = “#RRGGBB” The COLOR attribute of the FONT element. E.g.,
<FONT COLOR=“#RRGGBB”>this text has color</FONT>
 <PRE> Preformatted </PRE> Text enclosed by PRE tags is displayed in a
mono-spaced font. Spaces and line breaks are supported without
additional elements or special characters.
49
BOLD, ITALIC AND OTHER CHARACTER
FORMATTING ELEMENTS
 <EM> Emphasis </EM> Browsers usually display
this as italics.
 <STRONG> STRONG </STRONG> Browsers
display this as bold.
 <TT> TELETYPE </TT> Text is displayed in a
mono-spaced font. A typewriter text, e.g. fixed-
width font.
 <CITE> Citation </CITE> represents a document
citation (italics). For titles of books, films, etc.
Typically displayed in italics. (A Beginner's Guide
to HTML)
50
BOLD, ITALIC AND OTHER CHARACTER
FORMATTING ELEMENTS
<P> <FONT SIZE=“+1”> One Size
Larger </FONT> - Normal –
<FONT SIZE=“-1”> One Size
Smaller </FONT> <BR>
<B> Bold</B> - <I> italics</I> -
<U> Underlined </U> -
<FONT COLOR=“#FF0000”>
Colored </FONT> <BR>
<EM> Emphasized</EM> -
<STRONG> Strong </STRONG> -
<TT> Tele Type </TT> <BR>
One Size Larger - Normal – One Size
Smaller
Bold - italics - Underlined - Colored
Emphasized - Strong - Tele Type
51
CREATING REFERENCES IN HTML FILE
52
BOLD, ITALIC AND OTHER CHARACTER
FORMATTING ELEMENTS
53
ALIGNMENT
Some elements have attributes for alignment
(ALIGN) e.g. Headings, Paragraphs and Horizontal
Rules.
The Three alignment values are : LEFT, RIGHT,
CENTER.
<CENTER></CENTER> Will center elements.
54
ALIGNMENT
<DIV ALIGN=“value”></DIV> Represents a division in
the document and can contain most other element type.
The alignment attribute of the DIV element is well
supported.
<TABLE></TABLE> Inside a TABLE, alignment can be
set for each individual cell.
55
SPECIAL CHARACTERS & SYMBOLS
 These Characters are recognized in HTML as they begin with an
ampersand and end with a semi-colon e.g. &value; The value
will either be an entity name or a standard ASCII character
number. They are called escape sequences.
 The next table represents some of the more commonly used
special characters.
56
SPECIAL CHARACTERS & SYMBOLS
Special
Character
Entity
Name
Special
Character
Entity
Name
Ampersand &amp; & Greater-than
sign
&gt; >
Asterisk &lowast; Less-than sign &lt; <
Cent sign &cent; ¢ Non-breaking
space
&nbsp;
Copyright &copy; © Quotation mark &quot; "
Fraction one qtr &frac14; ¼ Registration
mark
&reg; ®
Fraction one half &frac12; ½ Trademark sign &trade; ™
57
SPECIAL CHARACTERS & SYMBOLS
• Additional escape sequences support accented characters, such
as:
• &ouml;
– a lowercase o with an umlaut: ö
• &ntilde;
– a lowercase n with a tilde: ñ
• &Egrave;
– an uppercase E with a grave accent: È
NOTE: Unlike the rest of HTML, the escape sequences are case
sensitive. You cannot, for instance, use &LT; instead of &lt;.
58
ADDITIONAL CHARACTER FORMATTING ELEMENTS
 <STRIKE> strike-through text</STRIKE>
DEL is used for STRIKE at the latest browsers
 <BIG> places text in a big font</BIG>
 <SMALL> places text in a small font</SMALL>
 <SUB> places text in subscript position </SUB>
 <SUP> places text in superscript style position </SUP>
59
EXAMPLE
<P><STRIKE> strike-through text </STRIKE></BR>
<BIG>places text in a big font </BIG><BR>
<SMALL> places text in a small font</SMALL><BR>
<SUB> places text in subscript position </SUB>
Normal
<SUP> places text in superscript style position </SUP><BR> </P>
60
LISTS
How to create a variety of lists.
Objectives
Upon completing this section, you should be able to
1. Create an unordered list.
2. Create an ordered list.
3. Create a defined list.
4. Nest Lists.
61
LIST ELEMENTS
 HTML supplies several list elements. Most list elements are
composed of one or more <LI> (List Item) elements.
 UL : Unordered List. Items in this list start with a list mark
such as a bullet. Browsers will usually change the list mark in
nested lists.
<UL>
<LI> List item …</LI>
<LI> List item …</LI>
</UL>
 List item …
 List item …
62
LIST ELEMENTS
 You have the choice of three bullet types: disc(default), circle,
square.
 These are controlled in Netscape Navigator by the “TYPE”
attribute for the <UL> element.
<UL TYPE=“square”>
<LI> List item …</LI>
<LI> List item …</LI>
<LI> List item …</LI>
</UL>
 List item …
 List item …
 List item …
63
LIST ELEMENTS
 OL: Ordered List. Items in this list are numbered automatically by
the browser.
<OL>
<LI> List item …</LI>
<LI> List item …</LI>
<LI> List item …</LI>
</OL>
1. List item …
2. List item …
3. List item
 You have the choice of setting the TYPE Attribute to one of five
numbering styles.
64
LIST ELEMENTS
TYPE Numbering Styles
1 Arabic numbers 1,2,3, ……
a Lower alpha a, b, c, ……
A Upper alpha A, B, C, ……
i Lower roman i, ii, iii, ……
I Upper roman I, II, III, ……
65
LIST ELEMENTS
You can specify a starting number for an ordered list.
<OL TYPE =“i”>
<LI> List item …</LI>
<LI> List item …</LI>
</OL>
<P> text ….</P>
<OL TYPE=“i” START=“3”>
<LI> List item …</LI>
</OL>
66
LIST ELEMENTS
i. List item …
ii. List item …
Text ….
iii. List item …
67
LIST ELEMENTS
 DL: Definition List. This kind of list is different from the others.
Each item in a DL consists of one or more Definition Terms (DT
elements), followed by one or more Definition Description (DD
elements).
<DL>
<DT> HTML </DT>
<DD> Hyper Text Markup Language </DD>
<DT> DOG </DT>
<DD> A human’s best friend!</DD>
</DL>
HTML
Hyper Text Markup Language
DOG
A human’s best friend!
68
NESTING LISTS
 You can nest lists by inserting a UL, OL, etc., inside a list item (LI).
Example
<UL TYPE = “square”>
<LI> List item …</LI>
<LI> List item …
<OL TYPE=“i” START=“3”>
<LI> List item …</LI>
<LI> List item …</LI>
<LI> List item …</LI>
<LI> List item …</LI>
<LI> List item …</LI>
</OL>
</LI>
<LI> List item …</LI>
</UL>
69
WHAT WILL BE THE OUTPUT?
 <H1 ALIGN="CENTER">SAFETY TIPS FOR CANOEISTS</H1>
<OL TYPE=“a” START=“2”>
<LI>Be able to swim </LI>
<LI>Wear a life jacket at all times </LI>
<LI>Don't stand up or move around. If canoe tips,
◦ <UL>
<LI>Hang on to the canoe </LI>
<LI>Use the canoe for support and </LI>
<LI>Swim to shore
</UL> </LI>
 <LI>Don't overexert yourself </LI>
<LI>Use a bow light at night </LI>
</OL> 70
THE OUTPUT….
71
 <H1 ALIGN="CENTER">SAFETY TIPS FOR CANOEISTS</H1>
 <OL TYPE="a" START="2">
 <LI>Be able to swim </LI>
 <LI>Wear a life jacket at all times </LI>
 <LI>Don't stand up or move around. If canoe tips,
 <UL>
 <LI>Hang on to the canoe </LI>
 <LI>Use the canoe for support
 <OL type="I" start="4">
 <LI> Be careful </LI>
 <LI> Do not look around</LI>
 </LI> </OL>
 <LI>Swim to shore
 </UL> </LI>
 <LI>Don't overexert yourself </LI>
 <LI>Use a bow light at night </LI>
 </OL>
72
What
will
be the
output?
THE OUTPUT….
73
IMAGES
How to place images in your pages?
Objectives
Upon completing this section, you should be able to
1. Add images to your pages.
74
IMAGES
 <IMG>This element defines a graphic image on the page.
 Image File (SRC:source): This value will be a URL
(location of the image) E.g.
http://www.domain.com/dir/file.ext or /dir/file.txt.
 Alternate Text (ALT): This is a text field that describes
an image or acts as a label. It is displayed when they
position the cursor over a graphic image.
 Alignment (ALIGN): This allows you to align the image
on your page.
76
IMAGES
 Width (WIDTH): is the width of the image in pixels.
 Height (HEIGHT): is the height of the image in pixels.
 Border (BORDER): is for a border around the image, specified
in pixels.
 HSPACE: is for Horizontal Space on both sides of the image
specified in pixels. A setting of 5 will put 5 pixels of invisible
space on both sides of the image.
 VSPACE: is for Vertical Space on top and bottom of the image
specified in pixels. A setting of 5 will put 5 pixels of invisible
space above and bellow the image.
77
SOME EXAMPLES ON IMAGES
1) <IMG SRC=“jordan.gif“ border=4>
2) <IMG SRC=" jordan.gif" width="60"
height="60">
3) <IMG SRC=“jordan.gif" ALT="This is a text that
goes with the image">
4) <IMG SRC=" jordan.gif “ Hspace="30"
Vspace="10" border=20>
5) < IMG SRC =" jordan.gif“ align="left">
blast blast blast blast blast
78
ANCHORS, URLS AND IMAGE MAPS
Learn about Uniform Resource Locator, and how to add them as
Anchor or Links inside your web pages.
Objectives
Upon completing this section, you should be able to
1. Insert links into documents.
2. Define Link Types.
3. Define URL.
4. List some commonly used URLs.
5. Plan an Image Map.
79
HOW TO MAKE A LINK
1. The tags used to produce links are the <A> and
</A>. The <A> tells where the link should start
and the </A> indicates where the link ends.
Everything between these two will work as a
link.
2. The example below shows how to make the
word
Here work as a link to yahoo.
Click <A HREF="http://www.yahoo.com">here</A>
to go to yahoo.
80
MORE ON LINKS
<body LINK="#C0C0C0" VLINK="#808080"
ALINK="#FF0000">
LINK - standard link - to a page the visitor hasn't been
to yet. (standard color is blue - #0000FF).
VLINK - visited link - to a page the visitor has been to
before. (standard color is purple - #800080).
ALINK - active link - the color of the link when the
mouse is on it. (standard color is red - #FF0000).
If the programmer what to change the color
Click <a href="http://www.yahoo.com"><font
color="FF00CC">here</font></a> to go to yahoo. 81
INTERNAL LINKS
 Internal Links : Links can also be created inside large documents to
simplify navigation. Today’s world wants to be able to get the
information quickly. Internal links can help you meet these goals.
1. Select some text at a place in the document that you would like to
create a link to, then add an anchor to link to like this:
<A NAME=“bookmark_name”></A>
The Name attribute of an anchor element specifies a location in the
document that we link to shortly. All NAME attributes in a document
must be unique.
2. Next select the text that you would like to create as a link to the
location created above.
<A HREF=“#bookmark_name”>Go To Book Mark</A>
82
E-MAIL (ELECTRONIC MAIL)
E.g. mailto:kmf@yahoo.com
The type of service is identified as the mail client
program. This type of link will launch the users mail
client.
The recipient of the message is kmf@yahoo.com
<A HREF=“mailto:kmf@yahoo.com”>Send me
More Information </A>
83
AREA SHAPES USED
84
CLIENT-SIDE IMAGE MAPS
 Client-side image maps (USEMAP) use a map file that is part of the HTML document
(in an element called MAP), and is linked to the image by the Web browser.
<IMG SRC="note.GIF" Width=200 Height=200
border="5" USEMAP="#map1">
<MAP NAME="map1">
<AREA SHAPE="RECT" COORDS="0,0,90,90"
HREF="hi.html" ALT="see me…">
<AREA SHAPE="RECT" COORDS="100,100,160,160"
HREF="divPara.html" ALT="see him…" >
<AREA SHAPE="CIRCLE" COORDS="150,50,20"
HREF="house.html" ALT="see it…" >
</MAP>
We can use Poly as well as Rect……
85
SHAPES, COORDS
• Types of Shapes
• Rect  used for squares and ordered shapes.
• Circle  used for circles.
• Poly  used for unordered shapes.
• Number of coordenations for each shape:
• Rect 4 numbers for two corners
• Circle 3 numbers for the center & R
• Poly  depends on the number of corners of the shape( 2
numbers for each corner)
86
TABLES
Objectives:
Upon completing this section, you should be
able to:
1. Insert a table.
2. Explain a table’s attributes.
3. Edit a table.
4. Add a table header.
87
TABLES
The <TABLE></TABLE> element has four sub-
elements:
1.Table Row<TR></TR>.
2.Table Header <TH></TH>.
3.Table Data <TD></TD>.
4.Caption <CAPTION></CAPTION>.
The table row elements usually contain table
header elements or table data elements.
88
TABLES
<table border=“1”>
<tr>
<th> Column 1 header </th>
<th> Column 2 header </th>
</tr>
<tr>
<td> Row1, Col1 </td>
<td> Row1, Col2 </td>
</tr>
<tr>
<td> Row2, Col1 </td>
<td> Row2, Col2 </td>
</tr>
</table>
89
TABLES
Column 1 Header Column 2 Header
Row1, Col1 Row1, Col2
Row2, Col1 Row2, Col2
90
TABLES ATTRIBUTES
BGColor: Some browsers support background colors
in a table.
Width: you can specify the table width as an absolute
number of pixels or a percentage of the document
width. You can set the width for the table cells as well.
Border: You can choose a numerical value for the
border width, which specifies the border in pixels.
CellSpacing: Cell Spacing represents the space
between cells and is specified in pixels.
91
TABLE ATTRIBUTES
 CellPadding: Cell Padding is the space between the cell border
and the cell contents and is specified in pixels.
 Align: tables can have left, right, or center alignment.
 Background: Background Image, will be titled in IE3.0 and
above.
 BorderColor, BorderColorDark.
92
TABLE CAPTION
A table caption allows you to specify a line of text that
will appear centered above or bellow the table.
<TABLE BORDER=1 CELLPADDING=2>
<CAPTION ALIGN=“BOTTOM”> Label For My
Table </CAPTION>
The Caption element has one attribute ALIGN that can
be either TOP (Above the table) or BOTTOM (below
the table).
93
TABLE HEADER
• Table Data cells are represented by the TD
element. Cells can also be TH (Table Header)
elements which results in the contents of the table
header cells appearing centered and in bold text.
94
TABLE DATA AND TABLE HEADER
ATTRIBUTES
 Colspan: Specifies how many cell columns of the table this
cell should span.
 Rowspan: Specifies how many cell rows of the table this cell
should span.
 Align: cell data can have left, right, or center alignment.
 Valign: cell data can have top, middle, or bottom alignment.
 Width: you can specify the width as an absolute number of
pixels or a percentage of the document width.
 Height: You can specify the height as an absolute number of
pixels or a percentage of the document height.
95
BASIC TABLE CODE
<TABLE BORDER=1 width=50%>
<CAPTION> <h1>Spare Parts <h1> </Caption>
<TR><TH>Stock Number</TH><TH>Description</TH><TH>List
Price</TH></TR>
<TR><TD bgcolor=red>3476-AB</TD><TD>76mm
Socket</TD><TD>45.00</TD></TR>
<TR><TD >3478-AB</TD><TD><font color=blue>78mm Socket</font>
</TD><TD>47.50</TD></TR>
<TR><TD>3480-AB</TD><TD>80mm
Socket</TD><TD>50.00</TD></TR>
</TABLE>
96
TABLE DATA AND TABLE HEADER ATTRIBUTES
<Table border=1 cellpadding =2>
<tr> <th> Column 1 Header</th> <th> Column 2
Header</th> </tr>
<tr> <td colspan=2> Row 1 Col 1</td> </tr>
<tr> <td rowspan=2>Row 2 Col 1</td>
<td> Row 2 Col2</td> </tr>
<tr> <td> Row 3 Col2</td> </tr>
</table>
97
TABLE DATA AND TABLE HEADER
ATTRIBUTES
Column 1 Header Column 2 Header
Row 1 Col 1
Row 2 Col 1
Row 2 Col 2
Row 3 Col 2
98
SPECIAL THINGS TO NOTE
• TH, TD and TR should always have end tags.
•
Although the end tags are formally optional, many browsers will mess up the formatting of the
table if you omit the end tags. In particular, you should always use end tags if you have a TABLE
within a TABLE -- in this situation, the table parser gets hopelessly confused if you don't close
your TH, TD and TR elements.
• A default TABLE has no borders
By default, tables are drawn without border lines. You need the BORDER attribute to draw the
lines.
• By default, a table is flush with the left margin
TABLEs are plopped over on the left margin. If you want centered tables, You can either: place the
table inside a DIV element with attribute ALIGN="center".
Most current browsers also supports table alignment, using the ALIGN attribute. Allowed values
are "left", "right", or "center", for example: <TABLE ALIGN="left">. The values "left" and "right"
float the table to the left or right of the page, with text flow allowed around the table. This is
entirely equivalent to IMG alignment .
99
WHAT WILL BE THE OUTPUT?
<TABLE BORDER width=“750”>
<TR> <TD colspan=“4” align=“center”>Page
Banner</TD></TR>
<TR> <TD rowspan=“2” width=“25%”>Nav Links</TD><TD
colspan=“2”>Feature Article</TD> <TD rowspan=“2”
width=“25%”>Linked Ads</TD></TR>
<TR><TD width=“25%”>News Column 1 </TD> <TD
width=“25%”><News Column 2 </TD></TR>
</TABLE>
100
THE OUTPUT
101
2a web technology html basics 1

Contenu connexe

Tendances (20)

Introduction To HTML
Introduction To HTMLIntroduction To HTML
Introduction To HTML
 
Html
HtmlHtml
Html
 
Html
HtmlHtml
Html
 
Html basics
Html basicsHtml basics
Html basics
 
Html
HtmlHtml
Html
 
Creating your 1st html page
Creating your 1st html pageCreating your 1st html page
Creating your 1st html page
 
What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)
 
Getting into HTML
Getting into HTMLGetting into HTML
Getting into HTML
 
Web Application and HTML Summary
Web Application and HTML SummaryWeb Application and HTML Summary
Web Application and HTML Summary
 
Html ppt computer
Html ppt computerHtml ppt computer
Html ppt computer
 
Web Page Designing Using HTML
Web Page Designing Using HTMLWeb Page Designing Using HTML
Web Page Designing Using HTML
 
Title, heading and paragraph tags
Title, heading and paragraph tagsTitle, heading and paragraph tags
Title, heading and paragraph tags
 
Html 5
Html 5Html 5
Html 5
 
Notes4
Notes4Notes4
Notes4
 
HTML Introduction
HTML IntroductionHTML Introduction
HTML Introduction
 
Html introduction
Html introductionHtml introduction
Html introduction
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
Html presentation
Html presentationHtml presentation
Html presentation
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
HTML5
HTML5 HTML5
HTML5
 

Similaire à 2a web technology html basics 1

Similaire à 2a web technology html basics 1 (20)

HTML Presentation
HTML Presentation HTML Presentation
HTML Presentation
 
presentation_html_ppt_1534512076_351187.pptx
presentation_html_ppt_1534512076_351187.pptxpresentation_html_ppt_1534512076_351187.pptx
presentation_html_ppt_1534512076_351187.pptx
 
7.Web computer note nrb officer Design Extra HTML.pdf
7.Web computer note nrb officer Design Extra HTML.pdf7.Web computer note nrb officer Design Extra HTML.pdf
7.Web computer note nrb officer Design Extra HTML.pdf
 
902350_HTML_Jar.ppt
902350_HTML_Jar.ppt902350_HTML_Jar.ppt
902350_HTML_Jar.ppt
 
DOC-20220920-WA0012..pptx
DOC-20220920-WA0012..pptxDOC-20220920-WA0012..pptx
DOC-20220920-WA0012..pptx
 
web development html css javascrptt902350_HTML_Jar.ppt
web development html css javascrptt902350_HTML_Jar.pptweb development html css javascrptt902350_HTML_Jar.ppt
web development html css javascrptt902350_HTML_Jar.ppt
 
Basics-of-HTML.ppt
Basics-of-HTML.pptBasics-of-HTML.ppt
Basics-of-HTML.ppt
 
902350_HTML_Jar.ppt
902350_HTML_Jar.ppt902350_HTML_Jar.ppt
902350_HTML_Jar.ppt
 
html presentation on basis of tage .ppt
html presentation on basis of tage  .ppthtml presentation on basis of tage  .ppt
html presentation on basis of tage .ppt
 
Intro to HTML
Intro to HTMLIntro to HTML
Intro to HTML
 
902350_HTML_Jar.ppt
902350_HTML_Jar.ppt902350_HTML_Jar.ppt
902350_HTML_Jar.ppt
 
Html
HtmlHtml
Html
 
Ankit (221348051) BCA-Aiml.pptx
Ankit (221348051) BCA-Aiml.pptxAnkit (221348051) BCA-Aiml.pptx
Ankit (221348051) BCA-Aiml.pptx
 
HYPER TEXT MARKUP LANGUAGE BASIC LESSONS
HYPER TEXT MARKUP LANGUAGE BASIC LESSONSHYPER TEXT MARKUP LANGUAGE BASIC LESSONS
HYPER TEXT MARKUP LANGUAGE BASIC LESSONS
 
HTML & CSS.ppt
HTML & CSS.pptHTML & CSS.ppt
HTML & CSS.ppt
 
Slides 2 - HTML
Slides 2 - HTMLSlides 2 - HTML
Slides 2 - HTML
 
Html.ppt
Html.pptHtml.ppt
Html.ppt
 
HTML introduction
HTML introduction HTML introduction
HTML introduction
 
HTML
HTMLHTML
HTML
 
html tags
 html tags html tags
html tags
 

Plus de Jyoti Yadav

8. Deep Learning.pdf
8. Deep Learning.pdf8. Deep Learning.pdf
8. Deep Learning.pdfJyoti Yadav
 
7. Reinforcement Learning.pdf
7. Reinforcement Learning.pdf7. Reinforcement Learning.pdf
7. Reinforcement Learning.pdfJyoti Yadav
 
6. Association Rule.pdf
6. Association Rule.pdf6. Association Rule.pdf
6. Association Rule.pdfJyoti Yadav
 
4. Classification.pdf
4. Classification.pdf4. Classification.pdf
4. Classification.pdfJyoti Yadav
 
3. Regression.pdf
3. Regression.pdf3. Regression.pdf
3. Regression.pdfJyoti Yadav
 
2. Data Preprocessing.pdf
2. Data Preprocessing.pdf2. Data Preprocessing.pdf
2. Data Preprocessing.pdfJyoti Yadav
 
1. Demystifying ML.pdf
1. Demystifying ML.pdf1. Demystifying ML.pdf
1. Demystifying ML.pdfJyoti Yadav
 
6. Web Publishing
6. Web Publishing6. Web Publishing
6. Web PublishingJyoti Yadav
 
5. Web Technology CSS Advanced
5. Web Technology CSS Advanced 5. Web Technology CSS Advanced
5. Web Technology CSS Advanced Jyoti Yadav
 
4. Web Technology CSS Basics-1
4. Web Technology CSS Basics-14. Web Technology CSS Basics-1
4. Web Technology CSS Basics-1Jyoti Yadav
 
3. Web Technology Advanced HTML
3. Web Technology Advanced HTML3. Web Technology Advanced HTML
3. Web Technology Advanced HTMLJyoti Yadav
 
2b. Web Technology HTML Basics-2
2b. Web Technology HTML Basics-22b. Web Technology HTML Basics-2
2b. Web Technology HTML Basics-2Jyoti Yadav
 
1. web technology basics
1. web technology basics1. web technology basics
1. web technology basicsJyoti Yadav
 

Plus de Jyoti Yadav (13)

8. Deep Learning.pdf
8. Deep Learning.pdf8. Deep Learning.pdf
8. Deep Learning.pdf
 
7. Reinforcement Learning.pdf
7. Reinforcement Learning.pdf7. Reinforcement Learning.pdf
7. Reinforcement Learning.pdf
 
6. Association Rule.pdf
6. Association Rule.pdf6. Association Rule.pdf
6. Association Rule.pdf
 
4. Classification.pdf
4. Classification.pdf4. Classification.pdf
4. Classification.pdf
 
3. Regression.pdf
3. Regression.pdf3. Regression.pdf
3. Regression.pdf
 
2. Data Preprocessing.pdf
2. Data Preprocessing.pdf2. Data Preprocessing.pdf
2. Data Preprocessing.pdf
 
1. Demystifying ML.pdf
1. Demystifying ML.pdf1. Demystifying ML.pdf
1. Demystifying ML.pdf
 
6. Web Publishing
6. Web Publishing6. Web Publishing
6. Web Publishing
 
5. Web Technology CSS Advanced
5. Web Technology CSS Advanced 5. Web Technology CSS Advanced
5. Web Technology CSS Advanced
 
4. Web Technology CSS Basics-1
4. Web Technology CSS Basics-14. Web Technology CSS Basics-1
4. Web Technology CSS Basics-1
 
3. Web Technology Advanced HTML
3. Web Technology Advanced HTML3. Web Technology Advanced HTML
3. Web Technology Advanced HTML
 
2b. Web Technology HTML Basics-2
2b. Web Technology HTML Basics-22b. Web Technology HTML Basics-2
2b. Web Technology HTML Basics-2
 
1. web technology basics
1. web technology basics1. web technology basics
1. web technology basics
 

Dernier

Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIShubhangi Sonawane
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 

Dernier (20)

Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 

2a web technology html basics 1

  • 2. HYPERTEXT MARKUP LANGUAGE • HTML stands for Hypertext Markup Language. • HTML is the standard markup language for creating Web pages • HTML describes the structure of a Web page • HTML consists of a series of elements • HTML elements tell the browser how to display the content • HTML elements label pieces of content such as "this is a heading", "this is a paragraph", "this is a link", etc.
  • 3. 3 HTML: HYPERTEXT MARKUP LANGUAGE • HTML documents are simply text documents with a specific form – Documents comprised of content and markup tags – Content: actual information being conveyed – The markup tags tell the Web browser how to display the page – An HTML file must have an htm or html file extension – An HTML file can be created using a simple text editor
  • 4. Features of HTML: •It is easy to learn and easy to use. •It is platform independent. •Images, video and audio can be added to a web page. •Hypertext can be added to text. •It is a markup language. Why learn HTML? •It is a simple markup language. Its implementation is easy. •It is used to create a website. •Helps in developing fundamentals about web programming. •Boost professional career. Advantages: •HTML is used to build a websites. •It is supported by all browsers. •It can be integrated with other languages like CSS, JavaScript etc. Disadvantages: •HTML can create only static webpages so for dynamic web page other languages have to be used. •Large amount of code has to be written to create a simple web page. •Security feature is not good.
  • 5. 5 HTML TAGS • HTML tags are used to mark-up HTML elements – Surrounded by angle brackets < and > – HTML tags normally come in pairs, like <tagname> (start tag) and </tagname> (end tag) – The text between the start and end tags is the element content – Not case-sensitive – Follow the latest web standards: • Use lowercase tags
  • 6. 6 TAG ATTRIBUTES • Tags can have attributes that provide additional information to an HTML element – Attributes always come in name/value pairs like: name=“value” – Attributes are always specified in the start tag – Attribute values should always be enclosed in quotes. Double quotes are most common. – Also case-insensitive: however, lowercase is recommended – <tagname a1=“v1” a2=“v2”></tagname> – For example, <table border=“0”> is a start tag that defines a table that has no borders
  • 7. 7 HTML DOCUMENT STRUCTURE • Entire document enclosed within <html> and </html> tags • Two subparts: – Head • Enclosed within <head> and </head> • Within the head, more tags can be used to specify title of the page, meta- information, etc. – Body • Enclosed within <body> and </body> • Within the body, content is to be displayed • Other tags can be embedded in the body
  • 9. ANATOMY OF HTML Note: Simple attribute values that don't contain ASCII whitespace (or any of the characters " ' ` = < > ) can remain unquoted, but it is recommended that you quote all attribute values, as it makes the code more consistent and understandable.
  • 10. ANATOMY OF THE HTML DOCUMENT
  • 13. A SIMPLE HTML DOCUMENT <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>My First Heading</h1> <p>My first paragraph.</p> </body> </html>
  • 14. WHAT IS AN HTML ELEMENT An HTML element is defined by a start tag, some content, and an end tag: <tagname>Content goes here...</tagname> The HTML element is everything from the start tag to the end tag: <h1>My First Heading</h1> <p>My first paragraph.</p>
  • 15. 15 HTML HEADINGS <html> <head> <title>Computer Science</title> </head> <body> <h1>Hello Computer Science</h1> <h2>Hello Computer Science</h2> <h3>Hello Computer Science</h3> <h4>Hello Computer Science</h4> <h5>Hello Computer Science</h5> <h6>Hello Computer Science</h6> </body> </html>
  • 16. 16 HTML PARAGRAPHS <html> <head> <title>International University</title> </head> <body> <h1>Hello International University</h1> <p> A Computer Science portal for IU<br> A Computer Science portal for IU<br> A Computer Science portal for IU<br> </p> </body> </html>
  • 17. NESTING ELEMENTS You can put elements inside other elements too — this is called nesting. If we wanted to state that our cat is very grumpy, we could wrap the word "very" in a <strong> element, which means that the word is to be strongly emphasized: You do however need to make sure that your elements are properly nested. In the example above, we opened the <p> element first, then the <strong> element; therefore, we have to close the <strong> element first, then the <p> element. The following is incorrect:
  • 18. EMPTY ELEMENTS Some elements have no content and are called empty elements. Take the <img> element that we already have in our HTML page: This contains two attributes, but there is no closing </img> tag and no inner content. This is because an image element doesn't wrap content to affect it. Its purpose is to embed an image in the HTML page in the place it appears.
  • 21. MARKING UP THE TEXT A lot of the web's content is lists and HTML has special elements for these. Marking up lists always consists of at least 2 elements. The most common list types are ordered and unordered lists: 1.Unordered lists are for lists where the order of the items doesn't matter, such as a shopping list. These are wrapped in a <ul> element. 2.Ordered lists are for lists where the order of the items does matter, such as a recipe. These are wrapped in an <ol> element. Each item inside the lists is put inside an <li> (list item) element.
  • 23. LINKS
  • 26. 26 HTML LAYOUT • One common way is to use HTML tables to format the layout of an HTML page – The trick is to use a table without borders, and maybe a little extra cell-padding • Other tips: – Keep screen resolution in mind – Use color to define spaces – Align your images – Balance the graphics and text on a page – Think about text width – scan length 7 – 11 words – Centering text is inadvisable
  • 27. 27 HTML FRAMES • HTML frames are a means of having several browser windows open within a single larger window • Each HTML document is called a frame • Disadvantages: –Must keep track of more HTML documents –Difficult to print the entire page
  • 28. COLOR CODES Colors are set using “RGB” color codes, which are, represented as hexadecimal values. Each 2-digit section of the code represents the amount, in sequence, of red, green or blue that forms the color. For example, a RGB value with 00 as the first two digits has no red in the color. 28
  • 32. 1. WHITE 2. BLACK 3. RED 4. GREEN 5. BLUE 6. MAGENTA 7. CYAN 8. YELLOW 9. AQUAMARINE 10. BAKER’S CHOCOLATE 11. VIOLET 12. BRASS 13. COPPER 14. PINK 15. ORANGE 1. #FFFFFF 1. #FFFFFF 2. #000000 3. #FF0000 4. #00FF00 5. #0000FF 6. #FF00FF 7. #00FFFF 8. #FFFF00 9. #70DB93 10. #5C3317 11. #9F5F9F 12. #B5A642 13. #B87333 14. #FF6EC7 15. #FF7F00 32 Color Codes
  • 33. THE BODY ELEMENT The BODY element of a web page is an important element in regards to the page’s appearance. Here are the attributes of the BODY tag to control all the levels: TEXT="#RRGGBB" to change the color of all the text on the page (full page text color.)  This element contains information about the page’s background color, the background image, as well as the text and link colors. 33
  • 34. BACKGROUND COLOR  It is very common to see web pages with their background color set to white or some other colors.  To set your document’s background color, you need to edit the <BODY> element by adding the BGCOLOR attribute. The following example will display a document with a white background color: <BODY BGCOLOR=“#FFFFFF”></BODY> 34
  • 35. TEXT COLOR The TEXT attribute is used to control the color of all the normal text in the document. The default color for text is black. The TEXT attribute would be added as follows: <BODY BGCOLOR=“#FFFFFF” TEXT=“#FF0000”></BODY> In this example the document’s page color is white and the text would be red. 35
  • 36. LINK, VLINK, AND ALINK These attributes control the colors of the different link states: 1. LINK – initial appearance – default = Blue. 2. VLINK – visited link – default = Purple. 3. ALINK –active link being clicked–default= Yellow. The Format for setting these attributes is: <BODY BGCOLOR=“#FFFFFF” TEXT=“#FF0000” LINK=“#0000FF” VLINK=“#FF00FF” ALINK=“FFFF00”> </BODY> 36
  • 37. USING IMAGE BACKGROUND  The BODY element also gives you ability of setting an image as the document’s background.  An example of a background image’s HTML code is as follows: <BODY BACKGROUND=“hi.gif” BGCOLOR=“#FFFFFF”></BODY> 37
  • 38. HEADINGS, PARAGRAPHS, BREAKS & HORIZONTAL RULES Adding headings to your page, insert paragraphs, add some breaks, and add horizontal rules. Objectives Upon completing this section, you should be able to 1. List and describe the different Heading elements. 2. Use Paragraphs to add text to a document. 3. Insert breaks where necessary. 4. Add a Horizontal Rule. 38
  • 39. HEADINGS, <HX> </HX> Inside the BODY element, heading elements H1 through H6 are generally used for major divisions of the document. Headings are permitted to appear in any order, but you will obtain the best results when your documents are displayed in a browser if you follow these guidelines: H1: should be used as the highest level of heading, H2 as the next highest, and so forth. You should not skip heading levels: e.g., an H3 should not appear after an H1, unless there is an H2 between them. 39
  • 40. HEADINGS, <HX> </HX> 40 <HTML> <HEAD> <TITLE> Example Page</TITLE> </HEAD> <BODY> <H1> Heading 1 </H1> <H2> Heading 2 </H2> <H3> Heading 3 </H3> <H4> Heading 4 </H4> <H5> Heading 5 </H5> <H6> Heading 6 </H6> </BODY> </HTML> Heading 1 Heading 2 Heading 3 Heading 4 Heading 5 Heading 6
  • 41. PARAGRAPHS, <P> </P> Paragraphs allow you to add text to a document in such a way that it will automatically adjust the end of line to suite the window size of the browser in which it is being displayed. Each line of text will stretch the entire length of the window. 41
  • 42. PARAGRAPHS, <P> </P> <HTML><HEAD> <TITLE> Example Page</TITLE> </HEAD> <BODY></H1> Heading 1 </H1> <P> Paragraph 1, ….</P> <H2> Heading 2 </H2> <P> Paragraph 2, ….</P> <H3> Heading 3 </H3> <P> Paragraph 3, ….</P> <H4> Heading 4 </H4> <P> Paragraph 4, ….</P> <H5> Heading 5 </H5> <P> Paragraph 5, ….</P> <H6> Heading 6</H6> <P> Paragraph 6, ….</P> </BODY></HTML> Heading 1 Paragraph 1,…. Heading 2 Paragraph 2,…. Heading 3 Paragraph 3,…. Heading 4 Paragraph 4,…. Heading 5 Paragraph 5,…. Heading 6 Paragraph 6,…. 42
  • 43. BREAK, <BR> Line breaks allow you to decide where the text will break on a line or continue to the end of the window. A <BR> is an empty Element, meaning that it may contain attributes but it does not contain content. The <BR> element does not have a closing tag. 43
  • 44. BREAK, <BR> <HTML> <HEAD> <TITLE> Example Page</TITLE> </HEAD> <BODY> <H1> Heading 1 </H1> <P>Paragraph 1, <BR> Line 2 <BR> Line 3 <BR>…. </P> </BODY> </HTML> Heading 1 Paragraph 1,…. Line 2 Line 3 …. 44
  • 45. HORIZONTAL RULE, <HR> The <HR> element causes the browser to display a horizontal line (rule) in your document. <HR> does not use a closing tag, </HR>. 45
  • 46. HORIZONTAL RULE, <HR> Attribute Description Default Value SIZE Height of the rule in pixels 2 pixels WIDTH Width of the rule in pixels or percentage of screen width 100% NOSHADE Draw the rule with a flat look instead of a 3D look Not set (3D look) ALIGN Aligns the line (Left, Center, Right) Center COLOR Sets a color for the rule Not set 46
  • 47. HORIZONTAL RULE, <HR> <HTML> <HEAD> <TITLE> Example Page</TITLE> </HEAD> <BODY> <H1> Heading 1 </H1> <P>Paragraph 1, <BR> Line 2 <BR> <HR>Line 3 <BR> </P> </BODY> </HTML> Heading 1 Paragraph 1,…. Line 2 ___________________________ Line 3 47
  • 48. CHARACTER FORMATTING How to enhance your page with Bold, Italics, and other character formatting options. Objectives Upon completing this section, you should be able to 1. Change the color and size of your text. 2. Use Common Character Formatting Elements. 3. Align your text. 4. Add special characters. 5. Use other character formatting elements. 48
  • 49. BOLD, ITALIC AND OTHER CHARACTER FORMATTING ELEMENTS  <FONT SIZE=“+2”> Two sizes bigger</FONT>  The size attribute can be set as an absolute value from 1 to 7 or as a relative value using the “+” or “-” sign. Normal text size is 3 (from -2 to +4).  <B> Bold </B>  <I> Italic </I>  <U> Underline </U>  Color = “#RRGGBB” The COLOR attribute of the FONT element. E.g., <FONT COLOR=“#RRGGBB”>this text has color</FONT>  <PRE> Preformatted </PRE> Text enclosed by PRE tags is displayed in a mono-spaced font. Spaces and line breaks are supported without additional elements or special characters. 49
  • 50. BOLD, ITALIC AND OTHER CHARACTER FORMATTING ELEMENTS  <EM> Emphasis </EM> Browsers usually display this as italics.  <STRONG> STRONG </STRONG> Browsers display this as bold.  <TT> TELETYPE </TT> Text is displayed in a mono-spaced font. A typewriter text, e.g. fixed- width font.  <CITE> Citation </CITE> represents a document citation (italics). For titles of books, films, etc. Typically displayed in italics. (A Beginner's Guide to HTML) 50
  • 51. BOLD, ITALIC AND OTHER CHARACTER FORMATTING ELEMENTS <P> <FONT SIZE=“+1”> One Size Larger </FONT> - Normal – <FONT SIZE=“-1”> One Size Smaller </FONT> <BR> <B> Bold</B> - <I> italics</I> - <U> Underlined </U> - <FONT COLOR=“#FF0000”> Colored </FONT> <BR> <EM> Emphasized</EM> - <STRONG> Strong </STRONG> - <TT> Tele Type </TT> <BR> One Size Larger - Normal – One Size Smaller Bold - italics - Underlined - Colored Emphasized - Strong - Tele Type 51
  • 52. CREATING REFERENCES IN HTML FILE 52
  • 53. BOLD, ITALIC AND OTHER CHARACTER FORMATTING ELEMENTS 53
  • 54. ALIGNMENT Some elements have attributes for alignment (ALIGN) e.g. Headings, Paragraphs and Horizontal Rules. The Three alignment values are : LEFT, RIGHT, CENTER. <CENTER></CENTER> Will center elements. 54
  • 55. ALIGNMENT <DIV ALIGN=“value”></DIV> Represents a division in the document and can contain most other element type. The alignment attribute of the DIV element is well supported. <TABLE></TABLE> Inside a TABLE, alignment can be set for each individual cell. 55
  • 56. SPECIAL CHARACTERS & SYMBOLS  These Characters are recognized in HTML as they begin with an ampersand and end with a semi-colon e.g. &value; The value will either be an entity name or a standard ASCII character number. They are called escape sequences.  The next table represents some of the more commonly used special characters. 56
  • 57. SPECIAL CHARACTERS & SYMBOLS Special Character Entity Name Special Character Entity Name Ampersand &amp; & Greater-than sign &gt; > Asterisk &lowast; Less-than sign &lt; < Cent sign &cent; ¢ Non-breaking space &nbsp; Copyright &copy; © Quotation mark &quot; " Fraction one qtr &frac14; ¼ Registration mark &reg; ® Fraction one half &frac12; ½ Trademark sign &trade; ™ 57
  • 58. SPECIAL CHARACTERS & SYMBOLS • Additional escape sequences support accented characters, such as: • &ouml; – a lowercase o with an umlaut: ö • &ntilde; – a lowercase n with a tilde: ñ • &Egrave; – an uppercase E with a grave accent: È NOTE: Unlike the rest of HTML, the escape sequences are case sensitive. You cannot, for instance, use &LT; instead of &lt;. 58
  • 59. ADDITIONAL CHARACTER FORMATTING ELEMENTS  <STRIKE> strike-through text</STRIKE> DEL is used for STRIKE at the latest browsers  <BIG> places text in a big font</BIG>  <SMALL> places text in a small font</SMALL>  <SUB> places text in subscript position </SUB>  <SUP> places text in superscript style position </SUP> 59
  • 60. EXAMPLE <P><STRIKE> strike-through text </STRIKE></BR> <BIG>places text in a big font </BIG><BR> <SMALL> places text in a small font</SMALL><BR> <SUB> places text in subscript position </SUB> Normal <SUP> places text in superscript style position </SUP><BR> </P> 60
  • 61. LISTS How to create a variety of lists. Objectives Upon completing this section, you should be able to 1. Create an unordered list. 2. Create an ordered list. 3. Create a defined list. 4. Nest Lists. 61
  • 62. LIST ELEMENTS  HTML supplies several list elements. Most list elements are composed of one or more <LI> (List Item) elements.  UL : Unordered List. Items in this list start with a list mark such as a bullet. Browsers will usually change the list mark in nested lists. <UL> <LI> List item …</LI> <LI> List item …</LI> </UL>  List item …  List item … 62
  • 63. LIST ELEMENTS  You have the choice of three bullet types: disc(default), circle, square.  These are controlled in Netscape Navigator by the “TYPE” attribute for the <UL> element. <UL TYPE=“square”> <LI> List item …</LI> <LI> List item …</LI> <LI> List item …</LI> </UL>  List item …  List item …  List item … 63
  • 64. LIST ELEMENTS  OL: Ordered List. Items in this list are numbered automatically by the browser. <OL> <LI> List item …</LI> <LI> List item …</LI> <LI> List item …</LI> </OL> 1. List item … 2. List item … 3. List item  You have the choice of setting the TYPE Attribute to one of five numbering styles. 64
  • 65. LIST ELEMENTS TYPE Numbering Styles 1 Arabic numbers 1,2,3, …… a Lower alpha a, b, c, …… A Upper alpha A, B, C, …… i Lower roman i, ii, iii, …… I Upper roman I, II, III, …… 65
  • 66. LIST ELEMENTS You can specify a starting number for an ordered list. <OL TYPE =“i”> <LI> List item …</LI> <LI> List item …</LI> </OL> <P> text ….</P> <OL TYPE=“i” START=“3”> <LI> List item …</LI> </OL> 66
  • 67. LIST ELEMENTS i. List item … ii. List item … Text …. iii. List item … 67
  • 68. LIST ELEMENTS  DL: Definition List. This kind of list is different from the others. Each item in a DL consists of one or more Definition Terms (DT elements), followed by one or more Definition Description (DD elements). <DL> <DT> HTML </DT> <DD> Hyper Text Markup Language </DD> <DT> DOG </DT> <DD> A human’s best friend!</DD> </DL> HTML Hyper Text Markup Language DOG A human’s best friend! 68
  • 69. NESTING LISTS  You can nest lists by inserting a UL, OL, etc., inside a list item (LI). Example <UL TYPE = “square”> <LI> List item …</LI> <LI> List item … <OL TYPE=“i” START=“3”> <LI> List item …</LI> <LI> List item …</LI> <LI> List item …</LI> <LI> List item …</LI> <LI> List item …</LI> </OL> </LI> <LI> List item …</LI> </UL> 69
  • 70. WHAT WILL BE THE OUTPUT?  <H1 ALIGN="CENTER">SAFETY TIPS FOR CANOEISTS</H1> <OL TYPE=“a” START=“2”> <LI>Be able to swim </LI> <LI>Wear a life jacket at all times </LI> <LI>Don't stand up or move around. If canoe tips, ◦ <UL> <LI>Hang on to the canoe </LI> <LI>Use the canoe for support and </LI> <LI>Swim to shore </UL> </LI>  <LI>Don't overexert yourself </LI> <LI>Use a bow light at night </LI> </OL> 70
  • 72.  <H1 ALIGN="CENTER">SAFETY TIPS FOR CANOEISTS</H1>  <OL TYPE="a" START="2">  <LI>Be able to swim </LI>  <LI>Wear a life jacket at all times </LI>  <LI>Don't stand up or move around. If canoe tips,  <UL>  <LI>Hang on to the canoe </LI>  <LI>Use the canoe for support  <OL type="I" start="4">  <LI> Be careful </LI>  <LI> Do not look around</LI>  </LI> </OL>  <LI>Swim to shore  </UL> </LI>  <LI>Don't overexert yourself </LI>  <LI>Use a bow light at night </LI>  </OL> 72 What will be the output?
  • 74. IMAGES How to place images in your pages? Objectives Upon completing this section, you should be able to 1. Add images to your pages. 74
  • 76.  <IMG>This element defines a graphic image on the page.  Image File (SRC:source): This value will be a URL (location of the image) E.g. http://www.domain.com/dir/file.ext or /dir/file.txt.  Alternate Text (ALT): This is a text field that describes an image or acts as a label. It is displayed when they position the cursor over a graphic image.  Alignment (ALIGN): This allows you to align the image on your page. 76
  • 77. IMAGES  Width (WIDTH): is the width of the image in pixels.  Height (HEIGHT): is the height of the image in pixels.  Border (BORDER): is for a border around the image, specified in pixels.  HSPACE: is for Horizontal Space on both sides of the image specified in pixels. A setting of 5 will put 5 pixels of invisible space on both sides of the image.  VSPACE: is for Vertical Space on top and bottom of the image specified in pixels. A setting of 5 will put 5 pixels of invisible space above and bellow the image. 77
  • 78. SOME EXAMPLES ON IMAGES 1) <IMG SRC=“jordan.gif“ border=4> 2) <IMG SRC=" jordan.gif" width="60" height="60"> 3) <IMG SRC=“jordan.gif" ALT="This is a text that goes with the image"> 4) <IMG SRC=" jordan.gif “ Hspace="30" Vspace="10" border=20> 5) < IMG SRC =" jordan.gif“ align="left"> blast blast blast blast blast 78
  • 79. ANCHORS, URLS AND IMAGE MAPS Learn about Uniform Resource Locator, and how to add them as Anchor or Links inside your web pages. Objectives Upon completing this section, you should be able to 1. Insert links into documents. 2. Define Link Types. 3. Define URL. 4. List some commonly used URLs. 5. Plan an Image Map. 79
  • 80. HOW TO MAKE A LINK 1. The tags used to produce links are the <A> and </A>. The <A> tells where the link should start and the </A> indicates where the link ends. Everything between these two will work as a link. 2. The example below shows how to make the word Here work as a link to yahoo. Click <A HREF="http://www.yahoo.com">here</A> to go to yahoo. 80
  • 81. MORE ON LINKS <body LINK="#C0C0C0" VLINK="#808080" ALINK="#FF0000"> LINK - standard link - to a page the visitor hasn't been to yet. (standard color is blue - #0000FF). VLINK - visited link - to a page the visitor has been to before. (standard color is purple - #800080). ALINK - active link - the color of the link when the mouse is on it. (standard color is red - #FF0000). If the programmer what to change the color Click <a href="http://www.yahoo.com"><font color="FF00CC">here</font></a> to go to yahoo. 81
  • 82. INTERNAL LINKS  Internal Links : Links can also be created inside large documents to simplify navigation. Today’s world wants to be able to get the information quickly. Internal links can help you meet these goals. 1. Select some text at a place in the document that you would like to create a link to, then add an anchor to link to like this: <A NAME=“bookmark_name”></A> The Name attribute of an anchor element specifies a location in the document that we link to shortly. All NAME attributes in a document must be unique. 2. Next select the text that you would like to create as a link to the location created above. <A HREF=“#bookmark_name”>Go To Book Mark</A> 82
  • 83. E-MAIL (ELECTRONIC MAIL) E.g. mailto:kmf@yahoo.com The type of service is identified as the mail client program. This type of link will launch the users mail client. The recipient of the message is kmf@yahoo.com <A HREF=“mailto:kmf@yahoo.com”>Send me More Information </A> 83
  • 85. CLIENT-SIDE IMAGE MAPS  Client-side image maps (USEMAP) use a map file that is part of the HTML document (in an element called MAP), and is linked to the image by the Web browser. <IMG SRC="note.GIF" Width=200 Height=200 border="5" USEMAP="#map1"> <MAP NAME="map1"> <AREA SHAPE="RECT" COORDS="0,0,90,90" HREF="hi.html" ALT="see me…"> <AREA SHAPE="RECT" COORDS="100,100,160,160" HREF="divPara.html" ALT="see him…" > <AREA SHAPE="CIRCLE" COORDS="150,50,20" HREF="house.html" ALT="see it…" > </MAP> We can use Poly as well as Rect…… 85
  • 86. SHAPES, COORDS • Types of Shapes • Rect  used for squares and ordered shapes. • Circle  used for circles. • Poly  used for unordered shapes. • Number of coordenations for each shape: • Rect 4 numbers for two corners • Circle 3 numbers for the center & R • Poly  depends on the number of corners of the shape( 2 numbers for each corner) 86
  • 87. TABLES Objectives: Upon completing this section, you should be able to: 1. Insert a table. 2. Explain a table’s attributes. 3. Edit a table. 4. Add a table header. 87
  • 88. TABLES The <TABLE></TABLE> element has four sub- elements: 1.Table Row<TR></TR>. 2.Table Header <TH></TH>. 3.Table Data <TD></TD>. 4.Caption <CAPTION></CAPTION>. The table row elements usually contain table header elements or table data elements. 88
  • 89. TABLES <table border=“1”> <tr> <th> Column 1 header </th> <th> Column 2 header </th> </tr> <tr> <td> Row1, Col1 </td> <td> Row1, Col2 </td> </tr> <tr> <td> Row2, Col1 </td> <td> Row2, Col2 </td> </tr> </table> 89
  • 90. TABLES Column 1 Header Column 2 Header Row1, Col1 Row1, Col2 Row2, Col1 Row2, Col2 90
  • 91. TABLES ATTRIBUTES BGColor: Some browsers support background colors in a table. Width: you can specify the table width as an absolute number of pixels or a percentage of the document width. You can set the width for the table cells as well. Border: You can choose a numerical value for the border width, which specifies the border in pixels. CellSpacing: Cell Spacing represents the space between cells and is specified in pixels. 91
  • 92. TABLE ATTRIBUTES  CellPadding: Cell Padding is the space between the cell border and the cell contents and is specified in pixels.  Align: tables can have left, right, or center alignment.  Background: Background Image, will be titled in IE3.0 and above.  BorderColor, BorderColorDark. 92
  • 93. TABLE CAPTION A table caption allows you to specify a line of text that will appear centered above or bellow the table. <TABLE BORDER=1 CELLPADDING=2> <CAPTION ALIGN=“BOTTOM”> Label For My Table </CAPTION> The Caption element has one attribute ALIGN that can be either TOP (Above the table) or BOTTOM (below the table). 93
  • 94. TABLE HEADER • Table Data cells are represented by the TD element. Cells can also be TH (Table Header) elements which results in the contents of the table header cells appearing centered and in bold text. 94
  • 95. TABLE DATA AND TABLE HEADER ATTRIBUTES  Colspan: Specifies how many cell columns of the table this cell should span.  Rowspan: Specifies how many cell rows of the table this cell should span.  Align: cell data can have left, right, or center alignment.  Valign: cell data can have top, middle, or bottom alignment.  Width: you can specify the width as an absolute number of pixels or a percentage of the document width.  Height: You can specify the height as an absolute number of pixels or a percentage of the document height. 95
  • 96. BASIC TABLE CODE <TABLE BORDER=1 width=50%> <CAPTION> <h1>Spare Parts <h1> </Caption> <TR><TH>Stock Number</TH><TH>Description</TH><TH>List Price</TH></TR> <TR><TD bgcolor=red>3476-AB</TD><TD>76mm Socket</TD><TD>45.00</TD></TR> <TR><TD >3478-AB</TD><TD><font color=blue>78mm Socket</font> </TD><TD>47.50</TD></TR> <TR><TD>3480-AB</TD><TD>80mm Socket</TD><TD>50.00</TD></TR> </TABLE> 96
  • 97. TABLE DATA AND TABLE HEADER ATTRIBUTES <Table border=1 cellpadding =2> <tr> <th> Column 1 Header</th> <th> Column 2 Header</th> </tr> <tr> <td colspan=2> Row 1 Col 1</td> </tr> <tr> <td rowspan=2>Row 2 Col 1</td> <td> Row 2 Col2</td> </tr> <tr> <td> Row 3 Col2</td> </tr> </table> 97
  • 98. TABLE DATA AND TABLE HEADER ATTRIBUTES Column 1 Header Column 2 Header Row 1 Col 1 Row 2 Col 1 Row 2 Col 2 Row 3 Col 2 98
  • 99. SPECIAL THINGS TO NOTE • TH, TD and TR should always have end tags. • Although the end tags are formally optional, many browsers will mess up the formatting of the table if you omit the end tags. In particular, you should always use end tags if you have a TABLE within a TABLE -- in this situation, the table parser gets hopelessly confused if you don't close your TH, TD and TR elements. • A default TABLE has no borders By default, tables are drawn without border lines. You need the BORDER attribute to draw the lines. • By default, a table is flush with the left margin TABLEs are plopped over on the left margin. If you want centered tables, You can either: place the table inside a DIV element with attribute ALIGN="center". Most current browsers also supports table alignment, using the ALIGN attribute. Allowed values are "left", "right", or "center", for example: <TABLE ALIGN="left">. The values "left" and "right" float the table to the left or right of the page, with text flow allowed around the table. This is entirely equivalent to IMG alignment . 99
  • 100. WHAT WILL BE THE OUTPUT? <TABLE BORDER width=“750”> <TR> <TD colspan=“4” align=“center”>Page Banner</TD></TR> <TR> <TD rowspan=“2” width=“25%”>Nav Links</TD><TD colspan=“2”>Feature Article</TD> <TD rowspan=“2” width=“25%”>Linked Ads</TD></TR> <TR><TD width=“25%”>News Column 1 </TD> <TD width=“25%”><News Column 2 </TD></TR> </TABLE> 100