Академический Документы
Профессиональный Документы
Культура Документы
COLUM
N
COLUM
N
COLUM
N
COLUM
N
ROW
ROW
ROW
ROW
ROW
ROW
ROW
ROW
ROW
<tr>
<th></th>
<th>Monday</th>
<th>Tuesday</th>
<th>Wednesday</th>
<th>Thursday</th>
<th>Friday</th>
<th>Saturday</th>
<th>Sunday</th>
</tr>
Will appear as:
MOND
AY
TUESD
AY
WEDNES
DAY
THURS
DAY
Images are added to a site using the <img> element, which must carry
at least two attributes: the src attribute, indicating the source of the
image, and an alt attribute, which provides a description of the image.
<img src="logo.gif" alt="Wrox logo" >
The src attribute tells the browser where to find the image.
The alt attribute should appear on every <img> element and its value
should be a text description of the image.
The height and width attributes specify the height and width of the
image, and the values for these attributes are almost always shown in
pixels.
<img src="logo.gif" alt="Wrox Logo" height="120"
width="180" >
Images can also be used as links, for example
<a href="http://www.wrox.com">
<img src="images/wrox_logo.gif" alt="Wrox logo"
width="338" height ="79" >
</a>
The <iframe>, or inline frame, is a special element that enables you to
embed another web page within a web page using the familiar src
attribute. By embedding the <iframe> from YouTube in a small corner
of your site, you can always be sure to get the latest content and code
that YouTube offers.
<iframe width="420" height="315"
src="http://www.youtube.com/embed/J---aiyznGQ"
frameborder="0" allowfullscreen></iframe>
FORMS
<form action=" http://www.example.org/search.aspx "
method="get">
<h3>Search the site</h3>
<input type="text" name="txtSearchItem">
<input type="submit" value="Search">
</form>
name="username"
name="username"
size="15"
size="15"
When the type attribute has a value of password it creates a text box
that acts just like a single-line text input, except the characters are
blocked out.
They are hidden in this way so that if someone is looking over the
user's shoulder, they cannot see sensitive data such as passwords.
The <textarea> element is used to create a mutli-line text input (for
example comments). Unlike other input elements this is not an empty
element. It should therefore have an opening and a closing tag.
<form action="http://www.example.com/profile.php">
<p>Please select your favorite genre:
<br />
<input type="radio" name="genre" value="rock"
checked="checked" /> Rock
<input type="radio" name="genre" value="pop" />
Pop
<input type="radio" name="genre" value="jazz" />
Jazz
</p>
</form>
The value attribute indicates the value that is sent to the server for the
selected option.
The value of each of the buttons in a group should be different (so that
the server knows which option the user has selected).
The checked attribute can be used to indicate which value (if any)
should be selected when the page loads. The value of this attribute is
checked. Only one radio button in a group should use this attribute.
Radio dictates the shape to a circle, to change it to a box we use:
input type="checkbox"
<form action="http://www.example.com/profile.php">
<p>What device do you listen to music on?</p>
<select name="devices">
<option value="ipod">iPod</option>
<option value="radio">Radio</option>
<option value="computer">Computer</option>
</select>
</form>
A drop down list box (also known as a select box) allows users to select
one option from a drop down list.
The <select> element is used to create a drop down list box. It
contains two or more <option> elements.
The <option> element is used to specify the options that the user can
select from.
The words between the opening <option> and closing </option> tags
will be shown to the user in the drop down box.
<form action="http://www.example.com/upload.php"
method="post">
<p>Upload your song in MP3 format:</p>
<input type="file" name="user-song" /><br />
<input type="submit" value="Upload" />
</form>
When the user clicks on the browse button, a window opens up that
allows them to select a file from their computer to be uploaded to the
website.
<fieldset>
<legend>Contact details</legend>
<label>Email:<br />
<input type="text" name="email" /></label><br />
<label>Mobile:<br />
<input type="text" name="mobile" /></label><br />
<label>Telephone:<br />
<input type="text" name="telephone" /></label>
</fieldset>