Professional Documents
Culture Documents
INTRODUCTION:
A webpage is a page containing text, images, audio, videos and links to other webpages.
These pages are written using a special language called Hyper Text Markup Language
(HTML). It describes the content, format and layout of the webpage.
HISTORY OF HTML:
HTML is derived from SGML, which stands for Standard General Markup Language. HTML
was invented by Tim-Berners-Lee in 1990.
The tools used for writing an HTML program are HTML editor and Web browser.
HTML Editor:
To create an HTML document, you require an HTML editor. There are two types of HTML
editors—WYSIWYG editor and Text editor.
WYSIWYG stands for What You See Is What You Get. These editors provide an interface
where you can create web pages without writing programs. Examples of WYSIWYG editors
are Adobe DreamWeaver, Kompozer etc.
Text Editors let us create HTML documents by writing HTML programs. Examples are
Notepad and Wordpad.
Web Browser:
Web browsers are used to view the webpages. Examples are Google Chrome, Mozilla
Firefox, Opera, Internet Explorer etc.
HTML TAGS
Commands in HTML are known as tags. All HTML tags are enclosed within the angle
brackets (< >). A tag can be a container tag or an empty tag.
Container Tag
A container tag is a tag that needs to be closed. A tag is closed by putting a forward slash (/)
in front of the tag name.
Example : <Hl> Hello World </Hl>
In this example, <H1> is the opening tag or the start tag and </Hl> is the closing tag or the
end tag.
Empty Tag
An empty tag is the tag that need not be closed. It has only opening tag.
Example: <img>, <br>
STRUCTURE OF AN HTML DOCUMENT:
HEAD section contains the title and other information about the HTML document.
BODY section contains all information that is displayed on the web page.
<html>
<head>
<title>.......</title>
</head>
<body>
..........
........
</body>
</html>
The names of HTML tags are case-insensitive, which means it can be written in any
case (upper, small or mixed)
Container tags must always be closed.
Tag names should not have spaces.
There should not be any space between < and > in a tag.
When two or more tags are used the inner tag should be closed before closing the
outer tag.
<HTML>
This is a container tag. An HTML program always begins with <HTML> tag and
ends with </HTML> tag. The complete program is written within the opening and
closing of <HTML> tags.
<HEAD>
<HTML> tag is followed by the <HEAD> tag. It contains the <title> tag which is
used to display the title of the web page. <title> tag is also a container tag. The title is
displayed on the title bar of the browser window.
<BODY>
This is also a container tag. It contains all the other formatting tags used in the HTML
program. It is closed just before the </HTML> tag.
CREATING, SAVING AND VIEWING A WEB PAGE
Go to Start and Open Notepad.
Type the HTML code.
Save the file using the extension .html
The saved file can be viewed with the help of a web browser.
Heading Tags:
HTML defines six levels of headings from H1 to H6. Each level implies the different font
sizes. H1 is the highest level and H6 is the lowest level. Heading tags are container tags.
Eg : <H1>Hello</H1>
Font Tag:
Font tag is used to change the appearance of the font such as size, color and style. The
different font tags include the following:
face: The type of font. Common ones include "Time New Roman", "Verdana", and
"Helvetica."
size: This indicates the size of the text.
color: This indicates the color of the text.
Example:
<font size=2 face="Helvetica" color=red>This illustrates the attributes of the font
tag.</font>
Image Tag:
Images are inserted into the webpage using <img> tag. It is an empty tag. The attributes of
image tag include the following:
src : specifies the URL/path of the image.
Height : specifies the height of the image
Width: specifies the width of the image
Example:
<img src=”flower.jpg” height=200 width=300”>
Lists in HTML:
Lists in HTML can be of two types:- Ordered and Unordered
1. Ordered Lists
Ordered lists are used to group a set of related items in a specific order. An ordered list is
created using <ol> container tag, and each list item starts with the <li> tag.The list items in
ordered lists are marked as 1,2,3.....
Example:
<ol>
<li>English
<li>Maths
<li>Science
</ol>
Output:
1. English
2. Maths
3. Science
2. Unordered Lists
Unordered lists are used to group a set of related items in no particular order. An
unordered list is created using the <ul> container tag, and each list item starts with
the <li> tag. The list items in unordered lists are marked with bullets.
Example:
<ul>
<li>English
<li>Maths
<li>Science
</ul>
Output:
English
Maths
Science
INTRODUCTION TO CSS
CSS stands for Cascading Style Sheets
CSS describes how HTML elements are to be displayed on screen, paper or in other
medias.
CSS saves a lot of work. It can control the layout of multiple webpages all at once.
1. Inline CSS:
Inline CSS contains the CSS property in the body section attached with the element.
This kind of style is specified within the HTML tag using style attribute.
Example:
<body>
</body>
Output:-
2. Internal CSS:
Internal CSS can be used when a single HTML document must be styled uniquely.
The CSS rule to be set should be written within the head section.
Syntax:
Example:
<head>
<style>
p{color:red;text-align:center}
</style>
</head>
<body>
<p>Internal CSS</p>
</body>
Output:-
Background Properties in CSS:
background-color:value
Example:
<head>
<style>
body{background-color:green;}
</style>
</head>
<body>
<p>Welcome to IHS</p>
</body>
Output