Web Design Notes
Web Design Notes
WEB DESIGHN
THE NYERI NATIONAL POLYTECHNIC.
CHAPTER 1
WORLD-WIDE WEB MODEL
INTERNET
This is a world-wide system of interconnected computers cooperating with each other to
exchange data using a common software standard through telephone lines and satellite
links. All the computers in the Internet can communicate with each other. These
computers use a communication standard called HTTP.
WWW
What is the World Wide Web?
The official definition of the WWW is "wide-area hypermedia information retrieval
initiative aiming to give universal access to a large universe of documents."
wide-area: The World Wide Web spans the whole globe.
hypermedia: It contains various types of media (text, pictures, sound,
movies ...) and hyperlinks that connect pages to one another.
information retrieval: Viewing a WWW document (commonly called a
Web page) is very easy thanks to the help of Web browsers. They allow
you to retrieve pages just by clicking links, or entering addresses.
universal access: It doesn't matter what type of computer you have, or
what type of computer the page you want is stored on - your Web browser
allows you to connect seamlessly to many different systems.
large universe of documents: Anyone can publish a Web page - and
nearly anyone has! No matter what obscure information you want to find,
there is bound to be someone out there who has written a Web page about
it.
The World Wide Web (WWW) is most often called the Web.
WEB SERVERS
At its core, a web server serves static content to a web browser by loading a file from a
disk and serving it across the network to a user’s web browser. This entire exchange is
mediated by the browser and server talking to each other using HyperText Transfer
Protocol (HTTP)
DNS SERVERS
Since most people have trouble remembering the strings of numbers that make up IP
addresses, and because IP addresses sometimes need to change, all servers on the Internet
also have human-readable names, called domain names. For example,
www.howstuffworks.com is a permanent, human-readable name. It is easier for most of
us to remember www.howstuffworks.com than it is to remember 209.116.69.66.
The name www.howstuffworks.com actually has three parts:
1. The host name ("www")
2. The domain name ("howstuffworks")
3. The top-level domain name ("com")
Domain names are managed by a company called VeriSign. VeriSign creates the top-
level domain names and guarantees that all names within a top-level domain are unique.
A set of servers called domain name servers (DNS) maps the human-readable names to
the IP addresses. These servers are simple databases that map names to IP addresses, and
they are distributed all over the Internet. Most individual companies, ISPs and
universities maintain small name servers to map host names to IP addresses. There are
also central name servers that use data supplied by VeriSign to map domain names to IP
addresses.
Web clients view the pages with a program called a Web browser.
A web browser is a piece of software that runs on your computer and allows you
to view Web pages. There are two types of browsers; text based browsers like
LYNX and graphic based browsers like Netscape Navigator and Internet
Explorer.
Features of WWW
- It has its own protocol i.e. HTTP
- It creates a convenient and user friendly environment
- It is the fastest components of Internet since it gathers together all the protocols into a
single system.
- It relies on the hypertext as means of Information retrieval.
- It has the ability to work with multimedia and advanced programming languages i.e.
text, graphics, video and audio.
- It is a delivery medium, content provider and subject matter.
- It connects users to almost any part of the Internet.
- It is used to explore intellectual, verbal knowledge and effective learning.
- It contains complex virtual web of connections and consist of files.
It provides real-time collaboration, interactive pages and automatic push of
information to client computers.
INTRANET
- Organizations can use Internet networking standards and web technology to create
private networks called intranets.
- An Intranet is an internal organizational network that can provide access to data
across the enterprise.
- It uses the existing company network infrastructure along with Internet connectivity
standards and software developed for the World Wide Web.
- Intranets can create networked applications that can run on many different kinds of
computers throughout the organization.
√ The principal difference between the Internet and an Intranet is that whereas the
Internet is open to anyone, the Intranet is private and is protected from public
visits by firewalls.
√ A firewall is a hardware or software placed between an organization’s internal
network and an external network to prevent outsiders from invading private
networks.
EXTRANET
- Private intranet that is accessible to select outsiders.
- They are extended to authorized users outside the company eg authorized buyers
could link to a portion of the company’s intranet to obtain information about the cost
and features of its products.
(3) E-mail
- This is online communication between computer users. It is quick, convenient,
efficient and cheap way to communicate with both individuals and groups.
- It’s the most popular internet service.
(4) TELNET
It’s a service that enables remote log in. Users are permitted to log in onto a host and
perform tasks as if they are working on the remote computer itself.
(7) IRC
This is an Internet service that allows a number of users to connect to the same
network node and communicate in real time.
INTERNET ADDRESSING
IP ADDRESS
An IP address is a unique numerical address assigned to every machine on the
Internet. The IP address is a 32 bit binary number normally represented as 4 decimal
values i.e. octets. Each octet represents 8 bits in range from 0 to 255 separated by decimal
points. This method of notation is called the dotted decimal notation e.g. 216.27.61.137
To guarantee world-wide unique addresses, IP addresses are licensed from
Network Information Center (NIC).
An IP address and its subnet mask perform the following functions:
- Enable the system to process the receipt and transmission of packets.
Compiled by M/s Wachira 5
Web Design Using Html
- They specify the device’s local addresses.
- They specify a range of addresses that share the cable with the device.
TRACERT
This command is used to determine the path of a packet.
IPCONFIG
This command is used to determine the IP address of your computer.
DOMAIN NAMES
This is a unique name that identifies an Internet site.
It is an alpha-numeric representation of the IP address. The characters are separated by
dots and correspond to an IP address e.g. www.nation.co.ke
IP addresses are not user friendly and could cause typing errors; the domain name system
(DNS) was created so people would not have to remember several confusing numbers.
Domain names enable short, alphabetical names to be assigned to IP addresses.
They are easier to remember and to work with than an IP address and are informative and
convenient to people.
FQDN
- A Fully Qualified Domain Name is a domain name that includes all higher level
domains relevant to the entity named.
- It is usually selected to give a clear indication of the site’s organization or sponsoring
agent.
DOMAIN NAME SERVICE (DNS)
- This is a hierarchical, distributed method of organizing the name space of the
Internet. It
translates domain names to IP addresses and vice versa.
- It provides a centralized, distributed database which keeps track of computers names
and their corresponding IP addresses.
- DNS servers are computers connected to the Internet host part of the DNS database
and allow others to access it.
- DNS servers contains a subset of the entire databases. DNS uses a client/server model
where the DNS servers contain information about a portion of the DNS database and
makes information available to clients.
How DNS function
- Enter the domain name in the address location
- The browser software will ask Windows for the IP address it maps to
- Windows then sends a request to the local name server(local ISP)
- If the local ISP does not get the request then it forwards it to a higher name server
until mapping is done.
- Translation then takes place ie domain name to IP address and vice versa
ROUTING
- A router is a machine that routes packets and keep information used to get data to its
destination in routing tables.
- Each router knows about its sub-networks and which IP addresses they use.
- Routers form a tree-like structure on the Internet with Network Service Provider
(NSP) backbone at the roots.
- When a packet(piece of data) arrives at a router, the router examines the IP address of
its destination then checks its routing table. If the network containing the IP address is
found the packet is sent to that network, if not, then the router sends the packet on a
default route up the backbone to next router until it finds its destination. This process
is called package routing.
CHAPTER 2
CONCEPTS OF WEB DESIGN
Definitions
Content
The actual 'meat' of a document -- all of the words, images, and links which a user
can read and interact with. The content is "whatever you put in the document."
Hyperlink
- This is a connection from one document to another or to any resource or within a
document. It is a connection made on a piece of text or media that takes users to
another web page.
- It is a part of web that can be clicked to get to somewhere else.
- A link from one document to another, or to any resource, or within a document.
Hypertext
This is text that contains links to other texts or documents.
It refers to any word or phrase in an electronic document that can be used as a
pointer to a related text page.
In-line
Almost always used in the context "in-line image," this refers to a resource of
some type, which is placed directly into a document. As I say, this is nearly
always an image, but the future could see things like in-line animations.
Hypermedia
- This is a system that has links between texts or media that takes users to another web
page.
- It contains various type of media hyper linked to connect a page to other page.
Broken Link
It is a link that references a page that no longer exists.
URL
The Uniform Resource Locator is a "standard" way of easily expressing the location and
data type of a resource. URLs in general take the form "protocol://address" 1 `where
protocol is procedure or method like gopher, FTP, telnet, and so on, and the address is
merely the server and pathname (if any) of a given resource or page.
The syntax is:
Scheme://host.domain[:port]/path/filename
Where scheme is one of:
File a file on your local system
ftp a file on an anonymous FTP server
http a file on a World Wide Web server
gopher a file on a gopher server
WAIS a file on a WAIS server
News a Usenet newsgroup
telnet a connection to a Telnet-based service
WEB DESIGN
This is a user centered multi disciplinary design pursuit pertaining to planning and
production of web sites. It includes influences from visuals arts technology, information
structure and networked delivery.
TYPES OF DOCUMENTS
(1) Static document
- Documents are stored as a file on a server
- The same content is delivered every time that URL is accessed.
- Advantages: They are simple, reliable, fast and the documents can be cached locally
at a client.
- Disadvantages: Inflexible as content can only be changed by updating the file.
Information can become boring easily.
(2) Dynamic documents
- The documents are created by a program like CGI -script.
- Advantages: Information is timely and always reflect the latest information.
- Disadvantages: They are not reliable.
Require high cost of executing and maintenance.
Slow to access
client: most users of the web simply want to access content. they need an
app that can receive incoming content and display it. this kind of app is
called a client. (eg. strictly speaking, an email program is considered a
client.) many kinds of possible web clients (real player, winamp), but most
popular is a web browser (displays html, plus many other common media
formats). client cache: the location data is temporarily stored while it is
displayed in your browser.
server: so where does a web page come from? servers, the host
computers that act as storage and distribution centres for web content
waiting to be delivered to web clients. a web server is a 24-hour
communication application that works something like an automated
telephone switchboard. it listens for calls ("requests") placed by people
using web browsers asking for web pages. once a request is made by a
browser, the server checks to see if it can find the requested page. if it can
find the page, the server sends it back to the browser and the browser
displays it. if the server can't find the page, or there is some other
problem, it sends back an error response in the form of a numeric code.
some responses are: "404--the web server can't find the page you asked
for", "403--you're not allowed to access the page you asked for without
Compiled by M/s Wachira 11
Web Design Using Html
authorization".
servers:
o are actual computers physically hooked up to the internet via
ethernet, cable, telephone line, etc.
o run software that listens for requests for web content and returns
messages and data.
o can perform tasks (run programs/scripts, query databases) before
responding to clients.
o can cease functioning without affecting the stability of the rest of the
web/internet.
protocol: the language used by the a client and server to negotiate the
transfer of data. web: http (hyper-text transfer protocol), file transfer: ftp
(file transfer protocol), transmission control protocol/internet protocol
(tcp/ip...tcp disassembles data into packets, ip handles addressing and
routing of the packets).
CHAPTER 3
OVERVIEW OF HTML
HTML CODING
- HTML stands for Hyper Text Markup Language.
- Hyper means active.
- It represents textual and image content.
- It is platform independent. This means that the text and the content are encoded in a
way that they can be displayed on a wide range of computers.
Advantages of HTML
1. It can be written in any editor.
2. It is universal and simple to learn and implement.
3. It gives an opportunity to further explore and add more features.
HTML Tags
HTML tags are used to mark-up HTML elements
An element is a fundamental component of the structure of a text document. Some
examples of elements are heads, tables, paragraphs, and lists.
Some elements may include an attribute, which is additional information that is
included inside the start tag.
HTML tags are surrounded by the two characters < and >
The surrounding characters are called angle brackets
HTML tags normally come in pairs like <b> and </b>
The first tag in a pair is the start tag, the second tag is the end tag
HTML tags are not case sensitive, <b> means the same as <B>
- There are four tags every HTML document should have. These tags define what type
of document it is, and the major sections.
- These tags are <HTML>, <HEAD>, <TITLE>, and <BODY ...>.
e.g.
<HTML>
<HEAD>
</HEAD>
<BODY>
<P>Hello world!</P>
</BODY>
</HTML>
- COMMENT TAG
The first line of the code usually starts with !. It is usually for commenting and it is an
empty tag. Comment tags do not show up in the browser window. They are ignored
by the browser. One can tell your web browser what version of HTML being used.
This needs to be written exactly as is. This, unlike the rest of the HTML language is
case sensitive. You can write all the other tags in upper or lower case.
You can also use comments to explain your code, which can help you when you edit
the source code at a later date.
<!-- This is a comment -->
Note that you need an exclamation point after the opening bracket, but not before the
closing bracket.
Its an empty tag.
- <HTML> </HTML>
This is now the beginning of the document. It tells the browser that the file contains
HTML coded information. The file extension .html indicates that the file is a HTML
document.</html>tells the browser that this is the end of the document.
- <HEAD> </HEAD>
This identifies the first part of the HTML - coded document that contains the title.
The title is shown as part of the browser’s window.
- <TITLE> </TITLE>
The title element contains the document title and identifies its content in a global
context. The title is typically displayed in the title bar at the top of the browser
window, but not inside the window itself. The title is also what is used to identify the
page for search engines and also what is displayed on a bookmark list. Titles should
be descriptive, unique and relatively short.
- <BODY> </BODY>
The body tag defines the look of the page as a whole – specifically global settings for
the color of the text, the color of the background and the color of the links.
This is the second and the largest part of the HTML document.
The Body section of HTML contains other tags, which display text, images, links and
multimedia.
Compiled by M/s Wachira 14
Web Design Using Html
e.g.
<HTML>
<HEAD>
<TITLE>Welcome to my page </TITLE>
</HEAD>
</BODY>
</HTML>
OTHER TAGS
HEADINGS
Html has six levels of headings numbered H1 to H6 with H1 being the largest. Headings
are typically displayed in larger and/or bolder fonts than normal body text.
<HTML>
<HEAD>
<TITLE>Welcome to my page </TITLE>
</HEAD>
</BODY>
</HTML>
PARAGRAPH
The amount of spaces and carriage returns are automatically compressed into a single
space when the HTML document is displayed in a browser.
Hence, the paragraph tag ,<P> </P> is used.
Attributes of Paragraph tag
<P ALIGN= CENTER></P>
<P ALIGN= RIGHT></P>
<P ALIGN=LEFT></P> is the default alignment i.e. if the align attribute is not included,
the paragraph will be left aligned.
LINE BREAK
When your HTML document is viewed, normally the text will do a word-wrap at the end
of a line. Using the <BR> tag forces a line break with no extra space between lines. This
<BR> tag has no closing tag.
HORIZONTAL RULE
The <HR> tag produces a horizontal line the width of the browser window. A horizontal
rule is useful to separate major sections of your document.
Attributes
WIDTH
The width of the rule can be expressed in two way: as a number or a as a percentage.
e.g <HR WIDTH=500> or <HR WIDTH = 75%>
SIZE
Allows the designer to specify how high, in pixels, the line will be.
NOSHADE
By default horizontal rules come with a 3D look. By using NOSHADE the line is
displayed without the drop shadow that would normally accompany the basic line.
e.g.
Logical styles
These styles tag text according to its meaning.
These tags do not directly specify the type of highlighting they will employ.
- The advantage of this approach is that it reduces repetition of modification of text e.g.
when you want to change the appearance of level one heading from 24-point times
centered to 30 Helvetica right aligned, all one has to do is change the definition of
level one in the web browser.
- Another advantage of logical styles is that they enforce consistency.
Physical styles
They offer consistency in that something you tag a certain way will always be displayed
that way for readers of your document.
Blockquote Forces a paragraph break above and below the text. Used to include
<blockquote>…… lengthy quotations in separate block on the screen. Most browsers
</blockquote> generally change the margins for the quotation to separate it from
the surrounding text.
Preformatted text Used to generate text exactly as typed in including spaces, new
<PRE>….</PRE> lines and tabs. Useful for program listings.
e.g.
<pre>
mangoes sh 5
Oranges sh 10
</pre>
Note: Most websites stick to fonts like Times Roman and Arial, because most computers
have these fonts installed. If you were to use an elaborate font and your viewers didn't
have that font, it will revert to Sans-Serif or Helvetica, as default.
SPECIAL CHARACTERS
The ASCII characters <,> and & have special meanings in HTML therefore, they cannot
be used in text. The angle brackets are used to indicate the beginning and end of tags
while the ampersand sign is used to indicate the beginning of an escape sequence.
NB/ Unlike the rest of HTML, the escape sequences are case sensitive.
MARQUEE ELEMENT
This is a tag that creates a scrolling text.
i.e. <marquee>……….</marquee>
It can not be nested and it must have an ending tag.
Attributes
Marquee Align= top/middle/bottom
This align the marquee with the top, middle or bottom of neighboring text line.
CHAPTER 5
HTML LISTS
Lists are often used to present information in an easy to read format. It can also be used
to indent information. Lists can be numbered, unnumbered or definition lists. Lists tags
can be nested.
There are three types of lists:
- Unordered/ Unumbered Lists (Bullets)
- Ordered/ Numbered Lists (Numbers)
- Definition Lists (no numbers or bullets)
Unordered Lists
These are bulleted lists i.e. a list of items is preceded by bullets or markers. It is a single
item list. The list begins and ends with this tag.
To make a bulleted list:
- Start with an opening list<UL> (for unnumbered list) tag
- Enter the <LI> (list item) tag followed by the individual item; no closing</LI> tag is
needed.
- End the entire list with a closing list </UL> tag.
The <LI> items can contain multiple paragraphs. Indicate the paragraphs with the <P>
paragraph tags.
e.g.
<UL>
<LI>Monday
<LI>Tuesday
<LI>Wednesday
</UL>
Attributes
Type: This is used to set different kind of bullet character. The options are:
- disc <UL type = square>
- circle
- square
Ordered Lists
A numbered list is identical to the unnumbered list only you use <OL> to number the list
<OL>
<LI>Monday
<LI>Tuesday
<LI>Wednesday
</OL>
Attributes
Type: This is used to set different kind of numbered lists.
E.g.
Plain number - <OL type =1>
Capital Letter - <OL type = A>
Small Letter - <OL type = a>
Capital Roman numbers - <OL type = I>
Compiled by M/s Wachira 21
Web Design Using Html
Small Roman numbers - <OL type = I>
Value: This is used to change the number within a list and is used as part of LI command.
<OL>
<LI value ="7">Item 7
<LI>Item 2
</OL>
Definition Lists
It consists of alternating a definition term<DT> and a definition <DD>. Web browsers
generally format the definition on a new line and indent it.
The <DT> and <DD> entries can contain multiple paragraphs.
e.g.
<DL>
<DT> Alligator
<DD>A large reptile with very sharp teeth.
<DT>Alliance
<DD>A union, relationship
</DL>
The COMPACT attribute can be used routinely in case your definition terms are very
short.
e.g.
<DL COMPACT>
<DT>ctrl s
<DD>Short cut for saving in Windows
</DL>
Nested Lists
Lists can be nested. You can also have a number of paragraphs, each containing a nested
list, in a single item.
e.g.
<UL>
<LI> A few provinces of Kenya:
<UL>
<LI>Nairobi
<LI>Coast
<LI>Western
WEEK 5
CHAPTER 6
Relative pathnames
You can link to documents in other directories by specifying the relative path from the
current document to the linked document. Relative links are useful because:
1. It is easier to move a group of documents to another location (because the relative path
names will still be valid.
2. It is more efficient connecting to the server
3. There is less to type
URLs
This is the address or location of the link.
The World Wide Web uses Uniform Resource Locators (URLs) to specify the location of
files on other servers. A URL includes the type of resource being accessed (e.g. web,
gopher, ftp), the address of the server and the location of the file. The syntax is:
Scheme://host.domain [:port]/path/filename
Attributes
Href
- Stands for hypertext reference.
- This is the location of the file or section of page that is referenced.
Color
The general color of the text links is specified in the <body> tag
i.e. <body link="ff00ff" vlink=#808080" alink="#ff0000"
where link is the color of the link that has not been visited, vlink is the color of the link
that has been visited and alink is the color displayed when the mouse hovers over the
text.
- One can also define colors for individual links on the page. There are two methods:
(a) Placing font tags between <a href> and </a> e.g.
Click <a href = "http://www.w3.com.org/addressing"><font
color="ffOOCC">here</font></a> to go to w3.
This works for most browsers except IE 3.0
(b) Using a style setting in the <a> tag e.g.
click<a href="http://www.mail.yahoo.com" style=color:rgb(0,255,0)"> here </a>
to go to w3.
This works for all browsers.
Target
The target is used if you want the link to open in another window or frame than where the
link itself is placed.
The format is <a href="url" target =" ">
The predetermined targets are:
- Blank : loads the page into a new browser window
- Self : loads the page into the current widow
- Parent : loads the page into the frame that is superior to the frame the hyperlink is in.
- Top : Cancels all frames and loads in full browser window
E.g.
<a href =http://www.jkuat.ac.ke target="blank"> here</a>
Name attribute
- This is used to set up named anchors.
- You can invisibly mark certain points of a document as places that can be jumped
directly instead of loading the document.
- The value of the Href attribute value of name attribute must be enclose with quotation
marks.
- The anchor should have either name or Href attribute but not both.
- The anchor can not be nested.
e.g.
<a href ="#linkname"> word</a>
linkname is the name of the section that you are linking to
The # symbol instructs the browser to look through the HTML document for a named
anchor.
A named anchor is a hidden reference marker for a particular section of the same page. It
is also used to mark a section of another page.
e.g.
<body>
<a name ="top"></a>
.
.
<a href ="top">TOP</a>
</body>
or
<a href ="#linkname"> word</a>
.
.
<A name ="linkname">about some text here</a>
In documentB.html:
Mailto
- Used to hyperlink email addresses, but this scheme is unique in that it uses only a
colon (:) instead of :// between the scheme and the address.
- You can make it easy for a reader to send electronic mail to a specific person or mail
alias by including the mailto attribute in a hyperlink. The format is:
<A HREF ="mailto:emailinfo@host">Name</a>
e.g.
<A HREF = " mailto:[email protected]"> Send me mail</a>
NB/ It is important to note that UNIX is case-sensitive operating system where filenames
are concerned.
HTML IMAGES
Images are also called pictures, graphics, icons, cliparts.
Most web browsers support two inline image formats ie GIF and JPEG
Attributes
Size
- This scales the image and sets the appropriate space (in pixels) as it downloads the
image.
< IMG SRC =”filename.gif” HEIGHT=100 WIDTH = 100>
Alignment
- By default an image is left aligned.
- This attributes controls text around the graphic. The align attribute can take the
following values: CENTER, RIGHT, LEFT, TOP, and BOTTOM.
<IMG SRC =”filename.gif” ALIGN=RIGHT>
Border
- This is used to place or eliminate a border round the image.
- Border widths are measured in pixels.
<IMG SRC =”filename.gif” BORDER=”0”>
Alt attribute
- This is used to define an alternate text for the image.
- It improves the display and usefulness for people using text only browsers or when
image autoload is off.
- It is used to give the user more information about the image.
<IMG SRC=”filename.gif” alt =”picture of a lion”>
Background Graphics
- Newer versions of web browsers can load an image and use it as a backgroundwhen
displaying a page.
- Background images can be a texture or an image of a logo.
- Using a feature called tiling, a browser takes the image and repeats it across and down
to fill your browser window.
<BODY BACKGROUND = “filename.gif”>
Images as Hyperlinks
- Inline images can be used as hyperlinks just like plain text. Ie. They can be used as
connectors to other web pages
IMAGE MAPS
- This is an active click able image that sends visitors to different web pages depending
on different parts of the image clicked. These are called hotspots.
- Using an image one can tell the browser that particular sections of the graphic, when
clicked, will trigger a jump to a particular page.
- The image is divided into regions or areas with each area linked to a different URL.
- An image map has three components:
o An image
o A set of map data
o A HTML host entry
- An image map is a normal web page typically stored in GIF or JPEG format.
Merit
- It is supported by all browsers.
Demerits
- It takes a lot of time to load.
- It requires more system and programs e.g. CGI on your web server.
- Status bar shows only coordinates flying by along with the name of the image mp file
include URL.
o Client-side image mapping:
A client side image map is made up of two elements: the graphical map
and the code which tells the browser how to operate it.
The code itself requires two elements, the <IMG> tag which will display
the map and the <MAP> tag which provides instructions on what it will
do.
With a client-side map, all of the data required to operate the selection
procedure is included with the HTML page, cutting out the need for
streams of communications with the server.
Client-side maps data is stored in HTML files and embedded directly into
a page containing other HTML elements and are interpreted by the web
browser program.
It works independently of your web server hence interpreted by the
visitors’ web browser.
The web data are embedded in the host page and when the client clicks on
the image, the browser processes without interaction with the server.
Demerits
Older browsers do not support it.
RECT
Two pairs of coordinates are needed to specify a rectangle. The first pair
specifies the top left corner of the rectangle while the second pair specifies
the bottom right corner of the rectangle.
e.g.
<AREA SHAPE ="RECT" COORDS="100,100,200,200"
Href=http://www.apage.co.uk">
CIRCLE
This is defined by its center and its distance from the center to any point
on the circle.
<AREA SHAPE ="CIRCLE" COORDS ="67,97,34">
POLYGON
Compiled by M/s Wachira 30
Web Design Using Html
This is a figure that has got any number of sides. Polygon is built by a list
of adjacent vertices.
E.g.
<AREA SHAPE ="POLY" COORDS =16,13,35,62,72,27,16,13>
COORDS
Specifies sets of X and Y coordinates within the map image that will act as
hotspots. When the mouse moves over a hotspot the browser detects that a
link has been activated. If a mouse button is pressed the browser will act
in the same way as if a hyperlink has been selected.
HREF
Contains the URL the browser will jump to when the hotspot is clicked by
the page visitor.
WEEK 8
HTML BACKGROUNDS
Modifying the background involves including attributes in the <BODY> tag:
BGCOLOR
It adds solid background color.
<BODY BGCOLOR= red>
TEXT
Is used to add color of normal body text.
LINK
Adds the color for hypertext links items.
VLINK - This attribute adds color for the recently visited link.(Visited link)
ALINK - This attribute adds color of the link that is currently being selected. (Active
link)
BACKGROUND
This attribute overrides the BGCOLOR attribute since wallpaper goes on top of the
background color.
Before including the background image you must consider the following point:
File size
Effect of texture
Readability of the text
BACKGROUND SOUND
Sound for the web comes in two main formats, digital audio or WAV and synthesized
music of MIDI format. Both are compatible with all browsers.
WAV is a very versatile Microsoft Windows format, which allows anything from music
samples to voice to be digitally recorded for later playback, either from a sound player or
over the web.
The MIDI format cannot handle digital data and instead draws on collections of preset
musical sounds which are usually stored on a chip on your PC sound card.
To add sound:
<a href ="mysound.wav"> Click here for my sound</a>
When the user clicks the hyperlink, the browser will automatically launch a suitable
player if one exists. If not, the browser will ask you if you wish to save the file to disk.
NB/ Care should be taken as these files are of a reasonable size.
BGSOUND TAG
It’s an easy way of adding a background sound:
<BGSOUND SRC="mysound.wav" LOOP =50>
Attributes
SRC
The SRC attribute allows the designer to specify which sound file is to be played, and
where to find it.
LOOP
This attribute takes one of two values. INFINITE which means the sound will continue to
play forever and X, where X is any value which determines how many times the sound
will play before ending.
NB/ Netscape does not support the <BGSOUND> tag.
SRC
The SRC attribute allows the designer to specify which sound file should be played.
WIDTH
Allows the width of the sound playing control to be specified. Most sound controls have a
small number of buttons including play, rewind and stop associated with them and by
specifying the width and height it is possible to fix the size of the control and buttons.
HEIGHT
Specifies the height of the sound playing control.
AUTOPLAY
Forces the file specified in SRC to play as soon as it is loaded.
LOOP
Takes the values TRUE or FALSE. Using TRUE forces the browser to endlessly repeat
the sound file.
VOLUME
Entering a percentage value between 0 and 100 forces the sound tool to alter the playback
volume of the sound to the specified level.
Placing it in a page:
This would play back the the file mysound.wav, placing the sound player in an area 150
by 250 pixels. The controls for the player would be displayed and the sound will loop. As
AUTOPLAY is not set the page visitor would have to use the player controls to start the
sound.
<EMBED SRC = "moresound.wav" HIDDEN ="TRUE" LOOP = "FALSE" VOLUME
="50%" AUTOPLAY = "YES">
The above example will hide the sound player, automatically starting the sound as soon
as it is loaded. The sound itself will play once(LOOP is set to FALSE) at half of the
maximum possible volume .
NB/ You may use multiple embed tags within one page, but it is recommended to never
set more than one on autoplay.
WEEK 6
CHAPTER 8
HTML TABLES
Tables establish a way of presenting data in a highly controlled tabulated form giving
greater control over positioning of elements.
Tables allow information to be in rows and columns.
Apart for allowing text to be arranged in columns tables can be used:
1. To divide the page into various sections
2. To create menus
3. To add interactive form fields
4. To create fast loading headers of page
Compiled by M/s Wachira 33
Web Design Using Html
5. For easy alignment of images
The <TABLE> tag is used to signify the start of a table definition.
CAPTION tag
This gives the caption for the title of the table. The default position of the title is centered
at the top of the table.
It is only permitted after the TABLE tag.
A good caption should provide a short heading for the table.
It has the following align attribute values: ALIGN=BOTTOM, TOP, LEFT, RIGHT.
NOTE
The content of a table is not shown until the entire table is loaded.
The table must be declared using the table tag
The second method, whilst not as exact, uses a percentage of the available space which
allows the table to expand or contract along with the browser if it is resized at any point.
e.g.
<TABLE WIDTH="90%"> forces the table to take 90% of the available horizontal space.
HEIGHT
It is declared just like the width attribute, however, not all browsers accept this attribute.
BORDER
This attribute sets the thickness of the borders surrounding the table.
e.g.
<TABLE BORDER =2>
If no border is desired a value of 0 BORDER=0 is given.
Every table is a collection of rows and cells. Each row contains a number of cells, each of
which contains the table information.
Rows must be set up before cells can be added in. In order, to create a table row the
<TR> and </TR> container is used. Each row can contain a number of cells .
The color of the border can be set by declaring:
<TABLE BORDER COLOR = red>
Table rows
The <TR> tag has the following attributes:
ALIGN
Specifies the horizontal alignment of cell data for a row. ALIGN can be either LEFT,
RIGHT, or CENTER.
BGCOLOR
A recent addition to the table attributes, BGCOLOR takes the same values as the
BGCOLOR attribute of the BODY tag.
NB/ This tag is not supported by all browsers.
Table Cells
For every ROW in a table there must be a number of cells which contain the data to be
displayed.
There are two elements for table cells ie <TH> and <TD>
<TD> tag that defines a table data cell. By default the text in this cell is aligned left and
centered vertically. It specifies the start and end tag of a cell which may hold data.
<TH> tag that defines a table header cell. By default the text in this cell is bold and
centered.
Every <TH> and <TD> tags have the following attributes:
CELLSPACING
This attribute sets the size of the "invisible" margin between individual cells in a table as
well as the size of the gap between the cells and the border of the table overall.
e.g.
<TABLE BORDER = 1 BORDERCOLOR=#ff0000 CELLSPACING=20>
<TR><TD>Data1<TD>Data2<TD>Data 3
<TR><TD>Data 4<TD>Data 5<TD>Data 6
</TABLE>
CELLPADDING
Allows the setting of the gap between the left hand edge of table cells and the start of the
cell contents.
Cellpadding can be used to create areas of space within cells so that the cell contents
don't appear to be pushed up close to the edge of that cell.
e.g.
<TABLE CELLSPACING = 20 or = 50%>
<TR><TD>D1<TD>D2<TD>D3
</TR><TD>D4<TD>D5<TD>D6
</Table>
ALIGN
This allows the horizontal position of the table overall to be set.
Giving values of RIGHT or LEFT allows the table to be pushed against the respective
page edge, using CENTER will align the table so it sits neatly in the middle of the page.
VALIGN
This allows the designer to specify where the cell contents will physically appear.
BGCOLOR
Allows the background color of individual cells to be specified.
Compiled by M/s Wachira 35
Web Design Using Html
WIDTH
This attribute allows the width of individual table cell to be specified either as an explicit
value or as percentage of the total table width.
NB/ Care should be taken when specifying cell widths as the browser will only allow one
width to be used per column.
If multiple widths are specified the browser will resize all cells in that column to the
width of the widest.
HEIGHT
Takes values explicitly or percentages.
NB/ It is not supported by all browsers.
NOWRAP
Tells the browser that any text in any cell which uses the NOWRAP attribute must appear
as a single line, rather than over a number of lines.
NOWRAP can be useful if a specific sentence is required to fill just one line.
It turns off word wrapping.
e.g
<TABLE>
<CAPTION ALIGN =Bottom> Table Head Summary </CAPTION>
<TR>
<TD>Row 1 Col 1</TD>
<TD>Row 1 Col 2</TD>
</TR>
<TR>
<TD> Row 2 Col 1 </TD>
<TD> Row 2 Col 2 </TD>
</TR>
</TABLE>
COLSPAN = number
This is an attribute that specifies the number of columns spanned by the current cell. The
value 0 means that cells span all columns from the current column to the last column of
the column group. Cells may span several columns.
e.g
<TABLE BORDER =1>
Compiled by M/s Wachira 36
Web Design Using Html
<TR>
<TD>1
<TD>2
<TD>3
</TR>
<TR>
<TD>4
<TD>6
<TD Colspan="2">8
</TR>
<TR>
<TD>9
<TD>10
</TR>
</TABLE>
ROWSPAN = number
This attribute specifies the number of rows spanned by the current cell including the
current row.
e.g.
<TABLE BORDER =1>
<TR>
<TD>A
<TD rowspan = 2>B
<TD>C
<TR>
<TD>D
<TD>E
<TR>
<TD>F
<TD>G
</TABLE>
e.g
<TABLE>
<CAPTION ALIGN =Bottom> Table Head Summary </CAPTION>
<TR>
<TD ROWSPAN=2>Row 1 Col 1</TD>
<TD COLSPAN=2>Row 1 Col 2</TD>
</TR>
<TR>
<TD> Row 2 Col 1 </TD>
<TD> Row 2 Col 2 </TD>
</TR>
</TABLE>
Compiled by M/s Wachira 37
Web Design Using Html
e.g.
<TABLE BORDER=1>
<TR><TD>Row 1 Cell 1</TD><TD>Row1 Cell 2</TD>
<TD>Row 1 Cell 3</TD>
</TR>
<TR><TD ROWSPAN = 2>Row 2 Cell 1</TD>
<TD COLSPAN =2>Row 2 Cell 2</TD>
</TR>
<TR><TD>Row 3 Cell 2</TD><TD>Row 3 Cell 3</TD>
</TR>
</TABLE>
THEAD
This contains the header information about the columns.
This element defines a group of header rows in a table. It follows caption, colspangroup
elements and precedes the optional TFOOT element and TBODY.
TFOOT
This contains the footer information about the columns. This element defines a group of
footer rows in a table. It follows the THEAD and precedes TBODY. It provides a
summary row or footnotes that apply to the entire table or portions of it.
TBODY
This defines a group of data rows in a table. A table must have one or more TBODY
element. It contains row groups
e.g.
<TABLE>
<THEAD>
<TR>
<TH>ABBR </TH>
<TH>Long Form </TH>
</TR>
</THEAD>
<TFOOT>
<TR>
<TD>Footer
</TR>
</TFOOT>
<TBODY>
<TR>
</TBODY>
</TABLE>
Compiled by M/s Wachira 38
Web Design Using Html
COL ELEMENT
This allows the designer to create structural divisions within a table.
It allows designers to share attributes among several columns without implying any
structural grouping.
HTML FRAMES
Frames allow author's to present or render documents in multiple views within sub
windows of the main window. This help in keeping certain information stationary e.g.
static banner, a small navigation bar.
Frames make it difficult to print paper copies of the web and not all web browsers
support frames.
A web page consists of a master HTML document that define FRAMESETS or the
arrangement of the framed areas on the page.
Frame is a way to divide the browser screen to allow easier navigation under some
circumstances.
When is it appropriate to use frames?
1. Common Content: If you have a collection of documents that share information, you
may want to display the common material in a frame. E.g a header, footer in the form of
navigational aids, copyright information, etc
2. Form verification: If the user is to submit a form, you may want to have the original
information displayed in one frame and the information that the server receives and sends
back displayed in an adjacent frame. This way, a user can do a side-to-side comparison,
to make sure that all the data is entered correctly.
3. Table of Contents: If your pages have a table of contents or an index, that you want
to remain on-screen for navigational purposes, you could place this material in a separate
frame. If the material fits into a small frame, hyperlinks could be set up to target a larger
frame.
NB/ Frames are not supported by all browsers. Only the latest versions can support
frames.
General Format:
<HTML>
<HEAD>
<FRAMESET>
</HTML>
<FRAMESET>………..</FRAMESET>
This specifies the layout of the main user window in terms of rectangular subspaces. It is
used to declare multiple frames.
This is a container element for dividing a window into rectangular subspaces called
frames.
It takes the place of the body element and immediately follows the head.
It can be nested and contain one or more frames element.
If rows and columns are omitted the implied values for the attribute is 100%.
This element accepts ONLOAD and ONUNLOAD attributes to specify client-side
scripting actions to perform when frames have all been loaded or removed.
<FRAME>
This element defines the contents and appearance of a single frame i.e. the rectangular
subspace within a frameset documents. Each frame element must be contained within a
frameset element that defines the dimensions of the frame.
Attributes of Frame
SRC Attribute
This provides the uniform resource identification of the frames content i.e. the source
document which is a typical HTML document. It specifies the location of the initial
contents to be contained in the frame.
e.g.
<HTML>
<HEAD><TITLE>A two row framed page</TITLE>
</HEAD>
<FRAMESET ROWS ="15%","85%" >
<FRAME SRC ="Frame-source1.html">
<FRAME SRC ="Frame-source2.html">
</FRAMESET>
</HTML>
NAME ATTRIBUTE
Name = “data”
This assigns a name to the current frame and may be used as the target of the subsequent
links i.e. A, Link, Base element
The name attribute must begin with a character in the range A-Z or a-z
Compiled by M/s Wachira 41
Web Design Using Html
The name should be human-readable and based on the content of the frame.
e.g.
<FRAMESET COL = "40%", *">
<FRAME NAME = "Menu" SRC = "List.html" Title = "Menu">
<FRAME NAME = "Content" SRC = "add.html" Title = "Content">
</FRAMESET>
FRAMEBORDER ATTRIBUTE
This specifies whether or not the frame has a visible border.
e.g. FRAMEBORDER =1 tells the browser to draw a border between the frame and all
adjoining frames. It is the default value.
FRAMEBORDER=0 tells the browser not to draw a border between this frame and every
adjoining frame though borders from other frames will override this.
MARGINWIDTH
This specifies the amount of space to the left between the frame's contents in the left and
right margins. The value must be greater than zero in pixels.
MARGINHEIGHT
This specifies the amount of space to be left between the frames content in its top and
bottom margins.
NORESIZE
This is a boolean attribute that tells the browser that the frame cannot be resized.
SCROLLING
This specifies whether the scrollbar should be provided for the frame. It takes the values
of AUTO, YES or NO.
The default value of AUTO generates scrollbars only when necessary.
The YES value generates scrollbars at all times.
The NO value suppress the scrollbar even if it is required hence should not be used.
LONGDESC
This specifies a link to a long description of the frame. It displays an alternate content for
non-visual browsers. This description should supplement the short description provided
using title attribute.
It is useful for non-visual browsers.
e.g.
<HTML>
<HEAD><TITLE>Some example of frames</TITLE>
<FRAMESET COLS ="33%", "33%", "33%">
<FRAMESET ROWS ="*, 200">
<FRAME SRC ="Source1.html" Scrolling ="yes">
<FRAME SRC ="Source2.html" NORESIZE MARGINWIDTH ="10">
</FRAMESET>
<FRAME SRC ="Source3.html" FRAMEBORDER ="0">
<FRAME SRC ="Source4.html" FRAMEBORDER ="0">
</FRAMESET>
</HTML>
Compiled by M/s Wachira 42
Web Design Using Html
TARGET ATTRIBUTE
It is used to direct hyperlinks into specific frames. You specify the name by using the
frame’s name as the value of the TARGET attribute. If the value of TARGET does not
match the name of any frame, a completely new browser window will be created.
This attribute may be set for elements that creates links (a, link) image maps (area) and
forms (form)
e.g.
<HTML>
<HEAD>
</HEAD>
<FRAMESET ROWS ="50%, 50%">
<FRAME NAME ="Dynamic" SRC = "dy.html">
<FRAME NAME ="Fixed" SRC = "fixed.html">
</FRAMESET>
</HTML>
E.G.
<HTML>
<HEAD>
</HEAD>
<BODY>
<P>Now you may have to advance to<A HREF ="doc.html TARGET
="Dynamic">Slide</A>
ALIGN ATTRIBUTE
This allows the content of Frame element: Left, right, bottom, and Center
Note
- The NOFRAME element and LONGDES attributes displays an alternate content.
- Frameset definition never changes but the contents of one of its frames can.
- Frameset definition never changes but the contents of one of its frames can.
- Frameset may make navigation forward and backward through for user browsers.
- Frameset cols ="50,**">
This means column of 50 pixels and * means the remain space left over.
Compiled by M/s Wachira 43
Web Design Using Html
- Authors should not use an image or similar objects as content of a frame for better
accessibility and better indexing with search engines.
<NOFRAMES> ELEMENT
NOFRAME element provide an alternate content for browsers that do not support frames.
It contains text that should only be rendered when frames are not displayed or the
browsers are configured not to display frames.
e.g.
<HTML>
<HEAD>
<TITLE>This is an example</TITLE>
</HEAD>
<FAMESET COLS="50%, 50%>
<FRAME SRC ="main.html">
<NOFRAMES>
<P>Here is the <A HREF ="main.html">NONFRAME</A>
</NOFRAMES>
</FRAMESET>
</HTML>
NB
It allows the explanation of the document's purpose in cases when it is used with
browsers that do not support frames.
FORM ELEMENT
<FORM>…….</FORM> defines an interactive form which is a web page form.
It contains the following form control element which are in the container for the form.
1. <INPUT>
2. <SELECT>………</SELECT>
3. <OPTION>
4. <TEXTAREA>……….</TEXTAREA>
5. <BUTTON>
6. <LABEL>
7. <OPTGROUP>
8. <LEGEND>
9. <FIELDSET>
Form element act as a container for controls:
It specifies:
- The layout of the form
- The program that will handle the completed and submitted form
- The receiving program must be able to place name/value pairs in order to make use of
them.(action)
- The method by which user data will be sent to the server (method)
- The character encoding that will be accepted by the server in order to handle this
form.
GET
Data from the form is posted by appendices the data to the end of script URL and send
the form input in an URL to the processing agent server the amount of data that it can
handle is limited by URL and what browser can process. It should be used when the form
causes no side effects i.e. idempotent e.g database
It restricts form data set values to ASCII characters.
It allows form submission to be containers completely in a URL.
POST
****Data from the form is sent as a separate packet to the HTTP server, the form is sent
in the body of the submission *******
It does not entail the character encoding and length restrictions imposed by GET.
The form data set is specified to cover the entire character set and is included in the body
of the form.
2. ACTION=" "
This specifies the URL of the script that the form should be sent to.
The value of action attribute is the URL of the destination. It usually points to a CGI
script or Java script that handles the form submission.
The value is the place where the form is to be sent to.
The URL identified does not have to be CGI script.
It may point to mailto: URL
e.g
<form action ="mailto:[email protected]" METHOD ="POST">
Note:
It is server side form handler and specifies the form processing agent.
3. ENCTYPE=" "
This specifies the content type used in submitting the form to the server when the value
of method is post.
The default value is "application/x-www-form-url.encoded" the value "multipart/form -
data" should be used in combination with input ELEMENT type="file".
e.g.
<form action =mailto:[email protected] METHOD="POST" ENCTYPE
="TEXT/PLAIN">
FORM CONTENTS
</FORM>
<FORM ACTION =http://amarco.co.ke/mg/aserver METHOD ="POST">
FORM CONTENT
</FORM>
6. TARGET =
This is used with frames to specify in which frame the form response should be rendered.
If no frame with such a name exist, response is rendered in a new window.
Th values are case sensitive e.g.
- TOP renders the response in the full unframed window.
- SELF renders the response in current frame
- BALNK renders the response in a new window
- PARENT renders the response in the immediate frameset parent.
The following attributes specify client side scripting actions for various events.
7. NAME
It names the element so that it may be referred to from style sheets or scripts.
8. ONSUBMIT
To specify when the form is submitted the action to be taken by the script.
9. ONRESET
To specify the action to be taken by script when the form is reset.
INPUT ELEMENT
This is one of the useful tags used in form's container which is an empty element.
It generates button, input fields and checkboxes.
It inputs areas in a form and defines a form control for the used to enter input.
2. VALUE
This specifies or sets the initial value of the area. It is optional except when type attribute
has the value radio or checkbox.
3. SIZE=" "
This sets the horizontal space of the area i.e. the initial width of the control.
4. MAXLENGTH
This sets the maximum size of the characters allowed in the area.
5. CHECKED
Compiled by M/s Wachira 47
Web Design Using Html
This boolean attribute specifies that the button is on. I.e. it initially sets either a radio
button or checkbox areas as checked.
6. SRC=" "
This specifies the source the source of an image to be used to decorate the graphical
submit button.
7. ALT=
This specifies the alternative text for an image.
8. ALIGN=
This specifies the alignment of the graphical submit button to top, middle and bottom.
9. READONLY
This sets the value of the area to read-only.
10. DISABLED
This disables the use of an area.
12. TABINDEX
This sets the order in which the area should receive focus i.e. position in tabbing order.
13. ONCLICK
Used to define the action taken when button is activated.
e.g. <INPUT TYPE=button VALUE ="Hide non-strict attributes" ID = toggler
ONCLICK ="TOGGLER()">
14. ONFOCUS
When the element receives focus.
15. ONBLUR
When the element loses focus.
16. ONSELECT
When text in an input of type text or password is selected.
17. ONCHANGE
When the element loses focus and its value has changed since it received focus.
TYPE=
This specifies the type of control to create the default value for this attribute is "text".
It defines the type of form control. It has the following value: text, password, checkbox,
radio, submit, reset, file, hidden, image and button.
e.g.
Compiled by M/s Wachira 48
Web Design Using Html
<INPUT TYPE = "image src = "dol.gif">
<INPUT TYPE = text NAME = Username SIZE="8" MAXLENGTH ="8">
TYPE = text
This creates a single line text input control area. E.g. <INPUT TYPE = text
NAME="text1" SIZE="30" VALUE ="H11">
TYPE = Password
Create a single line to input text but rendered as a series of asterisks. This contrtol type is
used for sensitive inputs.
e.g. <INPUT TYPE = password name ="pass" SIZE="30" VALUE ="Pass">
TYPE = Checkbox
This produces a checkbox if checked. It will come up checked selected initially. For
multiple checkboxes the name changes but value the same.
e.g.
<INPUT TYPE ="Checkbox" Name ="Rock" Value = "Yes" Checked>Hotdogs<BR>
<INPUT TYPE ="Checkbox" Value ="Yes" Name ="ED> Chips <BR>
Note
That every checkbox have a unique name and check boxes allows users to choose one or
more options.
TYPE = Radio
This produces a radio button which always exist in a group. All members of this group
have same name but different values hence allows users to choose only one of the several
options i.e. only one button can be checked initially or latter.
e.g.
<INPUT TYPE ="radio" NAME = food VALUE =Dan>HOT<BR>
<INPUT TYPE ="radio" NAME = food VALUE =Yes Checked>COLD<BR>
<INPUT TYPE ="radio" NAME = food VALUE =Lock>WARM<BR>
TYPE = Submit
This produces a submit button which when pressed sends the content of the form to the
servers.
For multiple submit buttons each should have a different name. It sends all the selection,
values and entered text to defined action destination.
e.g.
<INPUT TYPE="Submit" VALUE ="Send" Name ="Okoth>
<INPUT TYPE ="Submit" VALUE ="Send" Name ="Dan">
TYPE = Reset
This produces a reset button which will restore the form to its original state if pressed.
The value of VALUE attributes is used as text on the button.
e.g.
<INPUT TYPE ="reset" VALUE ="Clear">
TYPE = file
This creates a field through which users can upload files from their local computers or
network.
TYPE = Hidden
It allows author's to include form data without having it rendered to the user. It is useful
if the document is generated by a script and author need to store state information.
User input can be carried from form to form by hidden inputs.
It sends the form data without appearing in the layout of the web page.
e.g.
<INPUT TYPE ="hidden" NAME ="Instructor" VALUE [email protected]>
TYPE =Image
This creates a graphical submit button and provide alt attribute to act as an alternative
text to image you can also create an image map.
e.g.
<INPUT TYPE =Image SRC = source.gif ALT ="Submit">
Example
<INPUT TYPE ="Text" NAME ="Text" SIZE ="120">
<INPUT TYPE ="password" NAME ="pass" SIZE ="30">
<INPUT TYPE ="checkbox" NAME ="box" VALUE ="box" Checked>
<INPUT TYPE ="Radio" NAME ="food" VALUE ="Yes">
<INPUT TYPE ="Submit" VALUE ="SEND">
<INPUT TYPE ="Reset" VALUE ="RE">
<INPUT TYPE ="Textarea" COLS =30 ROWS = 40>
Quiz
What is the structure of a web form.
Describe the content of a web from data submission.
What is the difference between radio button and checkboxes, submit and reset forms
buttons.
TEXTAREA ELEMENT
This is a container element which defines a text input window, <textarea> is used for
large textual areas.
It allows users to enter multiple lines of text or information.
WRAP attribute
This is automatically wrap the text according the values.
Wrap = Virtual
Means that the text in box wraps but it is sent as one long continuous string.
Wrap = Physical
Means that the text in the box wraps and is sent that way too.
Wrap = Off
Means that the text in the box does not wrap but it is sent exactly the way it was typed in.
e.g.
<TEXTAREA NAME="Comments" ROWS ="10" Cols ="45" WRAP ="Virtual">
</Textarea>
STRUCTURAL DEFINITION
Heading <H?></H?> (the spec. defines 6 levels)
Align Heading <H? ALIGN=LEFT|CENTER|
Compiled by M/s Wachira 52
Web Design Using Html
RIGHT></H?>
Division <DIV></DIV>
Align Division <DIV ALIGN=LEFT|RIGHT|CENTER|JUSTIFY></DIV>
4.0 Defined Content <SPAN></SPAN>
<BLOCKQUOTE></
Block Quote BLOCKQUOTE> (usually indented)
4.0 Quote <Q></Q> (for short quotations)
4.0 Citation <Q CITE="URL"></Q>
Emphasis <EM></EM> (usually displayed as italic)
Strong <STRONG></STRONG> (usually displayed as bold)
Emphasis
Citation <CITE></CITE> (usually italics)
Code <CODE></CODE> (for source code listings)
Sample Output <SAMP></SAMP>
Keyboard Input <KBD></KBD>
Variable <VAR></VAR>
Definition <DFN></DFN> (not widely implemented)
Author's <ADDRESS></ADDRESS>
Address
Large Font Size <BIG></BIG>
Small Font Size <SMALL></SMALL>
(marks additions in a new
4.0 Insert <INS></INS>
version)
<INS
4.0 Time of Change DATETIME=":::"></INS>
4.0 Comments <INS CITE="URL"></INS>
(marks deletions in a new
4.0 Delete <DEL></DEL>
version)
<DEL
4.0 Time of Change DATETIME=":::"></DEL>
4.0 Comments <DEL CITE="URL"></DEL>
4.0 Acronym <ACRONYM></ACRONYM>
4.0 Abbreviation <ABBR></ABBR>
PRESENTATION FORMATTING
Bold <B></B>
Italic <I></I>
4.0* Underline <U></U> (not widely implemented)
Strikeout <STRIKE></STRIKE> (not widely implemented)
4.0* Strikeout <S></S> (not widely implemented)
Subscript <SUB></SUB>
Superscript <SUP></SUP>
Typewriter <TT></TT> (displays in a monospaced font)
Preformatted <PRE></PRE> (display text spacing as-is)
Width <PRE WIDTH=?></PRE> (in characters)
Center <CENTER></CENTER> (for both text and images)
N1 Blinking <BLINK></BLINK> (the most derided tag ever)
Font Size <FONT SIZE=?></FONT>(ranges from 1-7)