Chapter 02 - Introduction (1)
Chapter 02 - Introduction (1)
SE102.3
CHAPTER 02
Introduction to HTML
Ms. Thisarani Wickramasinghe
What is HTML?
HTML (Hyper Text Markup Language) is a language for specifying how text and graphics appear
on a web page.
When you visit a web site (e.g., www.google.com) your web browser retrieves the HTML web
page and renders it.
The HTML page is actually stored on the computer that is hosting the web site and the page is
sent to your browser.
To see what HTML looks like go to your web browser View menu and select View Source
▪ An HTML file is a text file containing small markup tags.
▪An HTML file must have an htm or html file extension.
▪ An HTML file can be created using a simple text editor
What is an HTML Element?
<html>
Your title and the Document (contains text
with HTML tags) goes here
</html>
An HTML document has two distinct parts HEAD and BODY.
Head Tag <Head>
HEAD tag comes after the HTML start tag.
It contains TITLE tag to give the document a title that displays on the browsers
title bar at the top.
<head>
<title>Your title goes here</title>
</head>
▪ <title>……</title> the title tag specifies the title for the web page
Body Tag <Body>
▪ The BODY tag contains all the text and graphics of the document with all the HTML
tags that are used for control and formatting of the page.
<body>
Your document goes here
</body>
Creating the First web page
▪An HTML document, web page can be created using a text editor,
Notepad or WordPad.
▪All the HTML documents should have the extension .htm or .html.
Step-3: Save the file as myfirstpage.html (go to File-Save As, give File
name: myfirstpage.html-choose save as type: All Files click save)
◦ Boldface: <b>…..</b>
◦ Italics: <i>….</i>
◦ Underline: <u>…..</u>
◦ Subscript: <sub>….</sub>
◦ Superscript: <sup>….</sup>
◦ Small: <small>….</small>
◦ Big: <big>….</big>
Font Tag <font>
Attributes of are color, size & face
▪ By using <FONT> Tag one can specify the colors, size, of the text.
COMMENTS
HTML comments are not displayed in the browser, but they can help document
your HTML source code.
Using Some Special Characters/ HTML Character
Entities
▪ There are certain special characters that can be used while creating document