HTML
HTML
AN INTRODUCTION
TO WEB PAG DEVELOPMENT
USMAN AHMAD.
INTRODUCTION TO HTML
With HTML you can create your own Web site.
HTML stands for Hyper Text Markup Language.
HTML is not a programming language, it is a
Markup Language.
A markup language is a set of markup tags.
HTML uses markup tags to describe web pages.
HTML is not case sensitive language.
HTML documents contain HTML tags and plain
text.
Purpose of HTML
Container Element:
Container Tags contains start tag & end tag i.e.
<HTML>… </HTML>
Empty Element:
Empty Tags contains start tag i.e.
<BR>
Text Formatting Tags
Heading Element:
There are six heading elements
(<H1>,<H2>,<H3>,<H4>, <H5>,<H6>).
All the six heading elements are container
tag and requires a closing tag.
<h1> will print the largest heading
<h6> will print the smallest heading
Heading Tag Code
<html>
<head><title>heading</title></head>
<body>
<h1> GOVT. POSTGRADUATE ISLAMIA COLLEGE, GRW.</h1>
<h2> GOVT. POSTGRADUATE ISLAMIA COLLEGE, GRW.</h2>
<h3> GOVT. POSTGRADUATE ISLAMIA COLLEGE, GRW.</h3>
<h4> GOVT. POSTGRADUATE ISLAMIA COLLEGE, GRW.</h4>
<h5> GOVT. POSTGRADUATE ISLAMIA COLLEGE, GRW.</h5>
<h6> GOVT. POSTGRADUATE ISLAMIA COLLEGE, GRW.</h6>
</body>
</html>
Result of Heading Code
HTML Paragraph Tag
HTML documents are divided into paragraphs.
Paragraphs are defined with the <p> tag i.e.
<p>This is a paragraph</p>
<p>This is another paragraph</p>
<pre>This text is preformatted</pre
Line Break & Horizontal Line Tag
If we want a line break or a new line without
starting a new
paragraph Use the <br> tag.
Defines a horizontal line use <hr>tag.
<br> <hr> element are empty HTML element i.e.
Global
Information Channel<hr>
Global Information <br> Channel
Font Tag
This element is used to format the size,
typeface and color of the enclosed text.
The commonly used fonts for web pages
are Arial, Comic Sans MS , Lucida Sans
Unicode, Arial Black, Courier New, Times
New Roman, Arial Narrow, Impact,
Verdana.
The size attribute in font tag takes values
from 1 to 7.
Font tag (Text)
The text that you are going to use on your web
page is controlled by the font tag,
SYNTAX: <font>…</font>
<a href=“http://www.google.com">
<img src=“penguins.jpg" alt="HTML
tutorial" style="width:42px;height:4
2px;">
</a>
Link to an Email Address
<a href="mailto:someone@exa
mple.com">Send email</a>
Hyperlink Summary
Tag Description
<ul> Defines an unordered list
<ol> Defines an ordered list
<li> Defines a list item
<dl> Defines a description list
<dt> Defines a term in a description list
<dd> Describes the term in a description list
Unordered HTML List
<ul>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
Ordered HTML List
<ol>
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
HTML Description Lists
<dl>
<dt>Coffee</dt>
<dd>- black hot drink</dd>
<dt>Milk</dt>
<dd>- white cold drink</dd>
</dl>
Body Margin
margin-top
margin-right
margin-bottom
margin-left
Body Margin
<BODY style=“
margin-top: 10%;
margin-bottom:10%;
margin-left:10%;
margin-right:10%;">
HTML Forms
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.
HTML Forms