Web Programming and Development
Web Programming and Development
DEVELOPMENT
HTML stands for HyperText Markup
Language. This is the language used to
create and link Web pages together.
<font size=“2”>
<font size=“2”>
Attributes are only contained in the opening
HTML tags to the right of the element and are
separated by a space and followed by an equal (=)
sign.
<font size=“2”>
CREATING A MARQUEE
Moving text and images can be displayed within a
document using the marquee tag. Text or images
can get the attention of a Web page visitor can be
produced by applying different attributes on the
marquee tag.
SYNTAX:
<marquee direction=“direction” behavior =“behavior”>
text content
</marquee>
MARQUEE TAG ATTRIBUTE
direction left, right, up, down
behavior scroll, slide, alternate
scrollamount “number”
height “number”
weight “number”
loop “number” or “infinite”
CREATING A HYPERLINK
The <a> tag defines an anchor. It create a link to
another document, by using the href attribute.
The a element is usually referred to as a link or a
hyperlink.
SYNTAX:
<a href = “file location”> Text used for link </a>
The most important attribute of the a element is
the href attribute, which indicates the link’s
destination.
By default, links will appear as follows in all
browsers:
•An unvisited link is underlined and blue
•A visited link is underlined and purple
•An active link is underlined and red
UNORDERED LISTS
An unordered list is a list of items. The list items
are marked with bullets (typically small black
circles).
An unordered list starts with the <ul> tag. Each list
item starts with the <li> tag.
HANDS-ON
<ul>
<li>Coffee</li>
<li>Milk</li>
</ul>
ORDERED LISTS
An ordered list is also a list of items. The list items
are marked with numbers.
An ordered list starts with the <ol> tag. Each list
item starts with the <li> tag.
HANDS-ON
<ol>
<li>Coffee</li>
<li>Milk</li>
</ol>
DEFINITION LISTS
Text Fields
Text fields are used when you want the user to
type letters, numbers, etc. in a form.
HANDS-ON
<form>
First name:
<input type="text" name="firstname">
<br>
Last name:
<input type="text" name="lastname">
</form>
Radio Buttons
Radio Buttons are used when you want the user to
select one of a limited number of choices.
HANDS-ON
<form>
<input type="radio" name="sex" value="male">
Male
<br>
<input type="radio" name="sex" value="female">
Female
</form>
Checkboxes
Checkboxes are used when you want the user to
select one or more options of a limited number of
choices.
HANDS-ON
<form>
Select the transportation that you like:
<input type="checkbox" name="vehicle" value=“bike”>
bike
<br>
<input type="checkbox" name="vehicle" value=“car”>
car
<br>
<input type="checkbox" name="vehicle“ value=“airplane">
airplane
</form>
Select and Option Tag
The select tag creates a list field in which some
choices are hidden. Start and end tags surround
list options which are marked with <option>. It
defines each individual choice that the user will
see.
HANDS-ON
<html>
Select the transportation that you like:
<select name="vehicle”>
<option> bike
<option> car
<option> airplane
</select>
</html>
Tables
Tables are defined with the <table> tag. A table is
divided into rows (with the <tr> tag), and each
row is divided into data cells (with the <td> tag).
The letters td stands for "table data," which is the
content of a data cell. A data cell can contain text,
images, lists, paragraphs, forms, horizontal rules,
tables, etc.
HANDS-ON
<table>
<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>
<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>
</table>
Tables and the Border Attribute
If you do not specify a border attribute the table
will be displayed without any borders. Sometimes
this can be useful, but most of the time, you want
the borders to show. To display a table with
borders, you will have to use the border attribute:
HANDS-ON
<table border="1">
<tr>
<td>Row 1, cell 1</td>
<td>Row 1, cell 2</td>
</tr>
</table>
Frames
With frames, you can display more than one HTML
document in the same browser window. Each HTML
document is called a frame, and each frame is
independent of the others.
The Frameset Tag
•The <frameset> tag defines how to divide the
window into frames
•Each frameset defines a set of rows or columns
•The values of the rows/columns indicate the amount
of screen area each row/column will occupy
The Frame Tag
•The <frame> tag defines what HTML document
to put into each frame
Example:
<frameset cols="25%,75%">
<frame src="frame_a.htm">
<frame src="frame_b.htm">
</frameset>