Professional Documents
Culture Documents
HTML Example
A small HTML document:
<!DOCTYPEhtml>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<h1>My First Heading</h1>
<p>My first paragraph.</p>
</body>
</html>
Example Explained
HTML Tags
<tagname>content</tagname>
The start tag is often called theopening tag. The end tag is often called
theclosing tag.
Web Browsers
The purpose of a web browser (Chrome, IE, Firefox, Safari) is to read HTML
documents and display them.
The browser does not display the HTML tags, but uses them to determine how to
display the document:
HTML Versions
Since the early days of the web, there have been many versions of HTML:
Version
Year
HTML
1991
HTML 2.0
1995
HTML 3.2
1997
HTML 4.01
1999
XHTML
2000
HTML5
2014
You can use either .htm or .html as file extension. There is no difference, it is up to
you.
EXP 2
HTML Forms are required when you want to collect some data from the site visitor.
For example during user registration you would like to collect information such as
name, email address, credit card, etc.
A form will take input from the site visitor and then will post it to a back-end
application such as CGI, ASP Script or PHP script etc. The back-end application will
perform required processing on the passed data based on defined business logic
inside the application.
There are various form elements available like text fields, text area fields, dropdown menus, radio buttons, checkboxes, etc.
The HTML<form>tag is used to create an HTML form and it has following syntax:
Form Attributes
Apart from common attributes, following is a list of the most frequently used form
attributes:
Attribute Description
action
method
Method to be used to upload data. The most frequently used are GET and
POST methods.
There are different types of form controls that you can use to collect data using
HTML form:
Checkboxes Controls
Hidden Controls
Clickable Buttons