Webmaster Sessions

HTML Tutorial - Form Elements

March 31, 2008

The HTML <input>, <textarea>, and <select> tags are used to specifiy elements to be used in forms. The uses for each tag are as follows:

Input Tag

Select Tag

Textarea

Textbox

<input type=”text” name=”text_name” value=”" />

Button

<input type=”button” name=”button_name” value=”A Button” />

<input type=”reset” name=”reset” value=”Clear Form Values” />

<input type=”submit” name=”submit” value=”Submit Form” />

Checkbox

<input type=”checkbox” name=”checkbox_name” />A Checkbox

A Checkbox

Radio

<input type=”radio” name=”radio_name” />A Radio Button

A Radio Button

Hidden

<input type=”hidden” name=”hidden_name” value=”" />

File

<input type=”file” name=”file_name” value=”" />

Dropdown

<select name=”select_name”>
<option value=”1″>Option 1</option>
<option value=”2″>Option 2</option>
<option value=”3″>Option 3</option>

</select>

Multi-Select

<select name=”multiple_select_name” multiple=”multiple” size=”3″>
<option value=”1″>Option 1</option>
<option value=”2″>Option 2</option>
<option value=”3″>Option 3</option>
</select>

Textarea

<textarea name=”textarea_name” cols=”50″ rows=”4″>TextArea Value</textarea>

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google
  • Technorati

HTML Tutorial - Form Introduction

March 30, 2008

HTML Forms have a wide variety of uses on the web. When data needs to be collected and send to a server or an email address, forms must be used. A form can be as simple as a textbox and a submit button, or can be as complex as a complete desktop application.

Every form starts out and ends with the <form> tag. Each element, such as a textbox or a button, are to be contained within the form tags. The most common used attributes for the form tag are method, and action.

The method attribute specifies how to send the data, whether it is a GET or POST request. A GET request appends the form values onto the query string and the POST request sends them without appending the values to the query string. In most cases, the POST method is the preferred method of transmitting form data.

The action attribute is used to specify the location to send the form data. Most of the time this is a server side script on the server, but it can also be an email address prefixed by “mailto:”.

The following is an example of how to use the form tag:

<form method=”post” action=”formpostscript.php”>

</form>

If you liked this post, please consider subscribing to my rss feed.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google
  • Technorati

HTML Tutorial - Fonts

March 30, 2008

The purpose of the <font> tag is to specify the font, the size of the font, and the color of the text. This tag has been deprecated by the W3C. Regardless, there are many websites who still use the font tag and most browsers still support it. Our recommendation is to use CSS Styles instead.

The three primary attributes of the font tag are color, face, and size. Color specifies the color of the text. Face defines the font to be used. Size determines the height and width of the text in proportion to the height and width of the font definition.

<font size=”1″ color=”red” face=”Times”>Red Text Size 1</font>

Red Text Size 1

<font size=”3″ face=”Verdana”>Verdana Size 3</font>

Verdana Size 3

<font size=”2″ face=”Helvetica” color=”brown”>Brown Text Helvetica Size 2</font>

Brown Text Helvetica Size 2

If you liked this post, please consider subscribing to my rss feed.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google
  • Technorati

HTML Tutorial - Preformatted Text

March 30, 2008

Preformatted text, denoted by the <pre> tag, will preserve spaces and line breaks within the borders of its tag. The pre tag is used most often to display a block of code.

<?php

 echo "Hello";

?>

The previous example is placed with the <pre> and </pre> tags.

If you liked this post, please consider subscribing to my rss feed.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google
  • Technorati

HTML Tutorial - Divisions and Spans

March 30, 2008

Division <div> and Span <span> tags are very useful HTML tags. In modern web development, the div tag is used extensively for many different purposes, from website layout to a popup made to show in front of the page layer. The span tag is mainly used to apply formatting and styling to a specific block of text.

The div tag is used as follows:

<div></div>

…and the span tag:

<span></span>

These tags can contain any amount of html code and apply formatting.

If you liked this post, please consider subscribing to my rss feed.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google
  • Technorati