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.
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.
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.
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.