Introduction
to HTML :- Hyper Text Markup Language(HTML) is used to create HTML page
and internet page. Once user create a HTML document, it can be view only
browser. There are lots of website, yahoo, Google etc. which is provides the
web and this web page can be rotate in any site of file. It is also work as FTP
(File Transfer Protocol).
History of HTML:- HTML is a
scripting language. It combines instruction with a data display program by web browser.
Such as Internet Explorer.
Tim
burners’ lee developed HTML at European Physics Laboratory in jnewa in
1990.originally developed by MOSAIC browser.
SGML (standard generalized markup language):- SGML (standard
generalized markup language) is developed in 1960, at IBM. To overcome the
problem I moving the document across the multiple hardware platform and
operating system developed HTML.HTML is subset of SGML.
Structure
of HTML document: - HTML generally has two parts, first is input and
second is output, which contains the tag to define few tags. The most things
about HTML is such as the body of text, heading, paragraph, line break and so
on.
Switching
between editor and browser:-
(a) Load any
editor for example Notepad.
(b) Create the HTML
page and save it with extension .HTML or .HTM.
(c) View it any
browser for internet Explorer.
Tag
Element:- there are two kinds of tag.
(a) Container
tag
(b) Empty tag
(a) Container tag <> </>:- these tag
which contain the text order tag element called container tag. There two tags,
first is start tag and second is end tag.
(b) Empty tag <> <>:- Empty tag
stand alone the contain text or any other tag element and empty function is
stand alone function within html document.
Java Script Programe
Programe-1
<html><head><style>
h2{color:red;font-family:times new
roman;background:pink;}
td{color:blue;font-family:times new roman;size:7px;}
</style></head><title>Form
Validation Example</title><script>
function ValidateContactForm()
{
var name =
document.ContactForm.Name;
var email
= document.ContactForm.Email;
var phone
= document.ContactForm.Telephone;
var nocall
= document.ContactForm.DoNotCall;
var what =
document.ContactForm.Subject;
var
comment = document.ContactForm.Comment;
if
(name.value == "")
{
window.alert("Please enter your name.");
name.focus();
return
false;
}
if
(email.value == "")
{
window.alert("Please enter a valid e-mail address.");
email.focus();
return
false;
}
if
(email.value.indexOf("@", 0) < 0)
{
window.alert("Please enter a valid e-mail address.");
email.focus();
return
false;
}
if
(email.value.indexOf(".", 0) < 0)
{
window.alert("Please
enter a valid e-mail address.");
email.focus();
return
false;
}
if
((nocall.checked == false) && (phone.value == ""))
{
window.alert("Please enter your telephone number.");
phone.focus();
return false;
}
if
(what.selectedIndex < 1)
{
alert("Please tell us how we can help you.");
what.focus();
return
false;
}
if
(comment.value == "")
{
window.alert("Please provide a detailed description or
comment.");
comment.focus();
return
false;
}
return true;
}
function EnableDisable(chkbx)
{
if(chkbx.checked == true)
{
document.ContactForm.Telephone.disabled = true;
}
else
{
document.ContactForm.Telephone.disabled = false;
}
}
</script><body
bgcolor="cyan">
<form method="post"
action="mailto:Frank@cohowinery.com"name="ContactForm"
onsubmit="return ValidateContactForm();">
<table border="2" width="40%"
align="Center">
<tr><th
colspan="2"><h2>ONLINE PROBLEM SOLVING
FORM</h2></th></tr>
<tr>
<td>Name:<span class="asterisk"><font
color="red">*</span></td><td><input
type="text" name="Name" size="60"></td></tr>
<tr> <td>E-mail Address:<span
class="asterisk"><font
color="red">*</span></td><td> <input type="text"
name="Email"size="60"></td></tr>
<tr>
<td>Telephone:<span class="asterisk"><font
color="red">*</span></td><td> <input
type="text" name="Telephone"size="60"></td></tr>
<tr> <td> Callling Options<input
type="checkbox" name="DoNotCall"
onclick="EnableDisable(this);"></td><td> Please
do not call me.</td></tr>
<tr>
<td>What can we help you with?<span
class="asterisk"><font
color="red">*</span></td><td><select
type="text" value="" name="Subject">
<option>Select </option> <option>Customer
Service</option> <option>Question</option>
<option>Comment</option>
<option>Consultation</option>
<option>Other</option> </select></td></tr>
<tr>
<td>Comments:</td><td>
<textarea cols="45" name="Comment"> </textarea></td></tr>
<tr> <td><input type="submit"
value="Send" name="submit"><input
type="reset" value="Reset"
name="reset"></td></tr>
</table></form></body></html>
No comments:
Post a Comment