You are on page 1of 26

(Hyper Text Markup Language)

HTML

TERMS TO KNOW BEFORE STARTING HTML:


Internet
Web page
Websites
Web server
Web browser
Markup Language
HyperText Markup Language (HTML)

INTERNET:
Called the 'information superhighway' and the 'network of networks,' it
is basically a means of connecting a computer to any other computer
anywhere in the world. When two computers are connected over the
Internet, they can send and receive all kinds of information such as text,
graphics, voice, video, and computer programs.

Web page
a file usually written in HTML that can be a

read by a Web browser.

A WEB BROWSER:
Browsers are basically software programs

that allow you to search for and view various


kinds of information on the Web, such as web
sites, video, audio, etc.

A WEBSITE :
A Website is a collection of documents
known as webpages The main page in a
website is called a homepage, and other
pages in a website are called subpages.
These are connected by hyperlinks.

A WEB SERVER:
The primary function of a web server is to

deliver web pages on the request .

HTML(Hypertext Markup
Language)
HTML is a language for describing web pages.
HTML is the language which browser

understands.

Structure of html document:


<html>
<head>
</head>

<body>
</body>
</html>

Common Tags
Always include the <HTML></HTML> tags
HTML documents
HEAD section

Information about the document


Information in header not generally rendered in display
window
TITLE element names your Web page
BODY section
Page content
Includes text, images, links, forms, etc.
Elements include backgrounds, link colors and font faces
P element forms a paragraph, blank line before and after

<Head> Section:
<html>
<head>
<title>My First HTML Document</title>
</head>
<body>
</body>
</html>

<BODY> Section:
Paragraphs:
HTML documents are divided into paragraphs.

<P> tag forms a paragraph, blank line before and after.

Headings
Simple form of text formatting

Vary text size based on the headers

level(h1,h2,h3,h4,h5,h6).
Can vary significantly between browsers

<BODY> Section:
<html>
<head>
<title>My First HTML Document</title>
</head>
<body>
<h1> Hello World!!!</h1>
<p> This is my first WEB PAGE</p>
</body>
</html>

Levels of Heading tag:


<h1> .. </h1>
<h2 > .. </ h2>
<h3 > .. </ h3>
<h4 > .. </ h4>
<h5 >.. </ h5>
<h6 > .. </ h6>

<html>
<head>
<title>My First HTML Document</title>
</head>
<body>
<center>
<h1> Level 1 Header </h1>
<h2 > Level 2 Header </ h2>
<h3 > Level 3 Header </ h3>
<h4 > Level 4Header </ h4>
<h5 > Level 5 Header </ h5>
<h6 > Level 6 Header </ h6>
</center>
</body>
</html>

Header elements H1 through


H6

Text Styling
Underline style
<U></U>

Align elements with ALIGN attribute


right, left or center

Close nested tags in the reverse order from which they

were opened
Emphasis (italics) style
<EM></EM>

Strong (bold) style


<STRONG></STRONG>

<B> and <I> tags deprecated

Stylizing text on Web pages

Example:
<html>
<body>
<p><b>This text is bold</b></p>
<p><strong>This text is strong</strong></p>
<p><i>This text is italic</i></p>
<p><em>This text is emphasized</em></p>
</body>
</html>

HTML Text Formatting Tags


Tag

Description

<b> </b>

bold text

<big> </big>

big text.(causes the size of text to be


increased by one font size. )

<em> </em>

emphasized text

<i> </i>

italic text

<small> </small>

small text(causes the size of text to


be decreased by one font size)

<strong> </strong>

strong text

<sub> </sub>

subscripted text

<sup> </sup>

superscripted text

<ins> </ins>

inserted text

<del> </del>

deleted text

Example:
<html>
<body>
<p><big>This text is big</big></p>
<p><small>This text is small</small></p>
<p>This is<sub> subscript</sub> </p>
<p>This is<sup>superscript</sup></p>

<p>This is<del>deleted</del></p>
<p>This is<del>deleted</del> but <ins> insert </ins> is used</p>
</body>
</html>

Attributes of Tags:
Attributes are the properties of tag.
Attributes give certain characteristics to a tag (e.g.,
height, width, color, etc.
Attributes are always specified in the start tag.
Attribute values should always be enclosed in
quotes.

The general syntax is as follows:


<tag attribute 1 = "value" attribute 2 = "value" ... >
</tag>

HTML Comments
Comments can be inserted into the HTML
code to make it more readable and
understandable. Comments are ignored by

the browser and are not displayed.


Comments are written like this:

<!-- This is a comment -->

Words To Know:
HTML Tag :
Tags are elements of the HTML document used to specify how the

document should be displayed by the browser. Tags look like this: <tag>

Elements:
Tags are also called element.
An HTML element starts with a start tag / opening <tag> An HTML

element ends with an end tag / closing </tag>. .


The element content is everything between the start and the end tag.

Attribute :
Used to modify the value of the HTML element. Elements will often have

multiple attributes.
For now just know that a tag is a command the web browser interprets, an
element is a complete tag, and an attribute customizes or modifies HTML
elements.

HTML:
Markup language
Used to format text and information

HTML
Marked up with elements, delineated by tags
Tags: keywords contained in pairs of angle

brackets

HTML tags
Not case sensitive
Good practice to keep all the letters in one case

Forgetting to close tags is a syntax error

Editing HTML
HTML files or documents
Written in source-code form using text editor
Notepad: Start-Programs-Accessories

HTML files
.htm or .html extensions
Name your files to describe their functionality
File name of your home page should be

index.html

Errors in HTML
Usually not fatal

You might also like