CH - 6 - Creating - Website - Using - HTML 9TH
CH - 6 - Creating - Website - Using - HTML 9TH
Using HTML
Learning Objectives
What is HTML?
Adding Graphics/Images to Web page
About HTML Tags & Attributes
Creating Marquee Text
Creating Ordered List
Linking Web pages
Creating Unordered List
What is HTML?
HTML stands for Hyper Text Mark-up Language and is a 'secret code' that is used to create
the look and layout of all the documents on the web. Why do we call it the secret code?
Well, because everything on the web page is a result of hidden instructions called tags that
instruct the web browser how to display the text, images or color. Moreover, the web browser
doesn't display the tags on the web page but only what we write within tags is shown. This
is the reason enough to call it the secret code.
? Do You Know
• HTML was developed by scientist Tim Berners-Lee in 1990.
• he standards for HTML are currently being developed by a World Wide Web Consortium
T
known as the W3C.
88 Brainy Gigabyte+ 8
HTML is a Standard Interface
It is important to understand that HTML is a standard interface. Specifically, these
recommendations have been published by an international consortium: the World Wide
Web Consortium (W3C), an organization in-charge of designing and maintaining the html
language. The official HTML specifications therefore describe not only the 'instructions' of
HTML, but also their implementation, i.e. their translation into computer programs to enable
the consultation of Web pages regardless of operating system or the architecture of the
computer.
About Attributes
An attribute is used to define the property or attribute
characteristics of an HTML tag and is placed inside the
<p align=“right“>
opening tag after tagname. A tag is the basic 'item'
and an attribute is some extra detail. Attributes are tag attribute name value/attribute
only contained in the opening HTML tags to the right property
of the element and are separated by a space and followed by an equal (=) sign. The value
that follows the equal sign is generally enclosed in quotes. Example: <font face= “Arial”
size=“2”>.
<html>
<head>
<title>My Page</title>
</head>
<body>
THIS IS MY FIRST WEB PAGE
</body>
</html>
Info
HTML tags are not case sensitive. It interprets both uppercase & lowercase letters as the same.
Knowing HTML 5
HTML 5 is the latest standard for HTML that was designed to replace both HTML 4 and XHTML. It
is specially designed to deliver rich content without the need of additional plug-ins. The current
version delivers everything from animation to graphics, music to movies and can also be used
to build complicated web applications. HTML 5 is designed to be used as cross-platform i.e.
you can use it on any platform such as personal computers, tablets, smart phones or even on
smart TV's.
<!Doctype html> The <!Doctype> declaration helps the browser to display a web page
correctly.
<html>
<head><title></title>
</head>
<body>
</body>
</html>
<body background = “image file name” > To set an image as the background for a
web page.
<body bgcolor="color name or code"> Specifies a background color for an
HTML page.
<body text="color name or code"> To control the text color in the body
of the web page.
92 Brainy Gigabyte+ 8
Aqua (Cyan) #00FFFF Magenta #FF00FF
Green #008000 Gray #808080
Teal #008080 Purple #800080
Lime #00FF00 Olive #808000
Navy #000080
Info
Using Color Names
You can also use any one of 16 color names to specify background or font color. Besides black and
white, you can specify aqua, blue, gray, green, lime, magenta, maroon, purple, red, silver, olive,
yellow and teal in double quotes (" ") with the color attribute (color) and Font tag.
Example: Type the following in the Notepad window and observe the output in the
browser window.
<html>
<head>
<title>ABOUT LINUX</title>
</head>
<body background="penguin.jpg">
<h1 align="center"><font color="red"> WHAT
IS LINUX?</h1></font>
<font face="Comic Sans Ms" size = "4" color
= "blue">
<p>Linux is a free Unix-type operating
system for computer devices. The operating
system is what makes the hardware work
together with the software. Linux is
freely available for everyone.
<p>Like other operating systems, Linux has
a graphical interface and types of software Info
you are accustomed to using on MS-Windows,
such as MS-Office, have Linux equivalents. It is recommended to use GIF (Graphic
</font> Interchange Format) and JPEG (Joint
</body> Photographic Expert Group) image files
</html> for the background.
Creating Lists
The best way to communicate your information to others is to make a list of the available
information. HTML supports unnumbered and numbered lists.
Creating Web Sites 93
HTML broadly defines three types of lists:
1.
Ordered List: It is also known as numbered list or sequential list.
2. Unordered List: Represents data in bulleted form. It is called bulleted list.
3. Definition List: Displays terms with corresponding definitions.
Definition
What is list?
Lists are used to group related pieces of information together, so that they are clearly associated
with each other and easy to read.
Ordered List
An ordered list is also called as numbered list where text is displayed in a sequence. The <ol>
(ordered list) tag defines a sequentially numbered list of items. It is used in conjunction with
the <li> tag (list item) that is used to tag individual list items in the list.
Example: To create a list with numbers.
<html>
<head><title> Internet Safety</title></
head>
<body>
<H1><font color="red"> INTERNET SAFETY
TIPS</h1></font>
<hrsize=3 color ="blue">
<ol><font face= “ Harlow Solid”>
<b>
<li> Don’t give out personal information
without your parents’ permission.
<li>Don’t share your password with anyone.
<li>Don’t agree to meet an online friend unless you have your parents’ permission.
<li>Don’t buy anything online without talking to your parents.
<li> Be careful and sure before you open an email attachment or download software.
</b></font>
</ol>
</body>
</html>
<html>
<head><title> Operating Systems</title></head>
<body>
<h1><font color="red" align="center"> TYPES OF OPERATING
SYSTEMS</h1></font>
<h3><font color="green">PROPRIETARY OS</h3></font>
<ol type ="a">
<li>MS-WINDOWS
<li>MAC OS X
</ol>
<h3><font color="blue"> OPEN SOURCE
OS</h3></font>
<ol type ="I">
<li>LINUX
<li>UBUNTU
<li>ReactOS
</ol>
</body>
</html>
Unordered List
The unordered list is a list of items in which each one is preceded by a 'bullet' (a distinctive
character; typically, a small black circle). The <ul> (unordered List) tag defines a bulleted list of
items. The <li> (list items) tag is nested inside the UL tag and defines each item within the list.
<html>
<head><title> Windows 10 </title></head>
<body>
<h1 align ="center"><font color="red" >ABOUT WINDOWS 10
</h1></font>
<ul type = square>
<font size= "5" face= “Arial” color =
“blue”>
<li> Start menu is back with start
button which was missing in Windows 8.
<li> Start menu has new look with live
tiles.
<li> Microsoft Edge replaces Internet
Explorer as default web browser.
<li>It supports Android applications.
</font>
</ul>
</body>
</html>
96 Brainy Gigabyte+ 8
The gif format pictures have transparent background and are good when you are working
with colored backgrounds. On the other hand jpg format pictures do not have transparent
backgrounds.
SRC Attribute
This attribute signifies the image source and instructs the browser from where to get the
image. SRC stands for source. It is always recommended that when you place any image on
a Web page, your image file should be in the same directory where your HTML document is
saved.
<img src="filename.gif">
Align Attribute
By default the bottom of an image is aligned with the text. You can align images to the top
,middle, left or right of a paragraph using the align attribute with <img> tag.
<img src="computer.jpg"align="right">
<html>
<head><title> Mobile Devices </title></head>
<body>
<h1 align =“center"><font color=“blue" >WHAT IS A MOBILE DEVICE?
</h1></font>
<img src= “tablets.jpg" align= “right" width= “150” height= “150” >
<font face="comic sans ms" size="4">
Marquee Text
The HTML <marquee> tag is used for scrolling a piece of text or image from right to left, left
to right, top to bottom or bottom to top when displayed on the browser.
Example:
<html>
<head>
<title>HTML marquee Tag</title>
</head>
<body>
<marquee>This is basic example of marquee
</marquee>
<marquee direction="up">The direction of
text will be from bottom to top.</marquee>
</body>
</html>
ubuntu.htm features.htm
<html> <html>
<head><title> Ubuntu </title></head> <head><title> Ubuntu </title></head>
<body> <body>
<h1 align ="center"><font color="blue"> <h1 align ="center"><font color="blue">
KNOWING UBUNTU</h1></font> FEATURES OF UBUNTU</h1></font>
<img src= "ubuntu.jpg" align= "right" <ol>
width="100" height="100"> <li> Easy to install.
<font face="comic sans ms" size="4"> <li> Minimun disk and memory space
Ubuntu is a Linux based open source required.
operating system. Its desktop looks <li>Supports all social networking
similar to MS- Windows.</font> services.
<p>Features of Ubuntu <a href="features. </body>
htm">CLICK</a>
</html>
</body>
</html>
Example:
<html>
<head><title> Ubuntu </title></head>
<body alink="red" vlink= "blue">
<h1 align ="center"><font color="blue">
KNOWING UBUNTU</h1></font>
<img src= "ubuntu.gif" align= "right"
width="100" height="100">
<font face="comic sans ms" size="4">
Ubuntu is a Linux based open source
operating system. Its desktop looks
similar to MS- Windows.</font>
<p>Features of Ubuntu <a href="features.
htm">CLICK</a>
</body>
</html>
mainpage.htm advantages.htm
homepage.htm
disadvantages.htm tips.htm
homepage.htm
<html>
<head>
<title>E-Shopping</title>
</head>
<body>
</html>
mainpage.htm
<html>
<head>
<title>E-Shopping </title>
</head>
<body>
<h1 align="center"><font color="blue">
What is E-Shopping</font></h1>
<hr color="green">
<img src="eshop.jpg" align="left"
width="100" height="100">
<p><font face="Comic Sans MS"
color="red">
E-shopping/Online Shopping is a form
of electronic commerce which allows
consumers to directly buy goods or services from a seller over the Internet using a
web browser.</font>
<p><b>Home Page<a href="homepage.htm">CLICK</a>
</body>
</html>
<html>
<head>
<title>E-Shopping </title></head>
<body>
<h1 align="center"><font color="red">
ADVANTAGES OF E-SHOPPING</font></h1>
<hr color="blue">
<img src="eshoping.jpg" align="right"
width="200" height="200">
<ul>
<li>Saves time
<li>24/7 Availability
<li>Comparison of Prices and Products
<li>Easier to find discounts
<li>Save Fuel and Energy
</ul>
<p><b>Home Page<a href="homepage.htm">CLICK</a>
</body></html>
disadvantages.htm
<html>
<head>
<title>E-Shopping </title></head>
<body>
<h1 align="center"><font color="green">
DISADVANTAGES OF E-SHOPPING</font></h1>
<hr color="red">
<img src="shopping.jpg" align="right"
width="200" height="200">
<ul>
<li>Long Delivery Period
<li>High Shipping Cost
<li>Returning policies are not clear
</ul>
<p><b>Home Page<a href="homepage.htm">CLICK</a>
</body></html>
<html>
<head>
<title>E-Shopping </title></head>
<body>
<h1 align="center"><font color="red"> TIPS FOR
SAFE E-SHOPPING</font></h1>
<hr color="blue">
<img src="eshop.jpg" align="right" width="200"
height="200">
<ol>
<li>Use Familiar Websites
<li>Never ever, ever buy anything online using
your credit card from a site that doesn't have SSL (secure sockets layer) encryption
installed.
<li>Always use OTP(One time password) option while using credit or debit cards.
<li>Regularly check your electronic statements of your credit card, debit card and
bank accounts.
</ol>
<p><b>Home Page<a href="homepage.htm">CLICK</a>
</body></html>
2. They instruct the web browser the way in which the web page is to be presented.
5. The tag that is used to give specifications of the size, color and style of the text in a web page.
12. In the ordered list the sequence begins with these automatically in the browser.
13. The most widely used graphic formats for the web pages.
6. To insert a graphic into the web page and align it to the right. __________________
2. The organization responsible for designing and maintaining the HTML language. ______________
6. The attribute used to change the styles of bullets in an unordered list. ______________
D. State whether the following statements are True or False. Rewrite the false statements correctly.
1. HTML documents are case sensitive.
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
4. It is recommended to place the image used in the page and web document file in different folders.
_______________________________________________________________________________
_______________________________________________________________________________
2. img _______________________________________________________________________
3. href _______________________________________________________________________
4. html _______________________________________________________________________
5. gif _______________________________________________________________________
6. jpeg _______________________________________________________________________
7. W3C _______________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
__________________________________
2 Chirag is developing a home page for his school web site. Read the following statements and suggest
him the correct options.
a) He needs to display the school building image in the center of the page.
______________________________________________________________________________
b) He wants to create horizontal rule of red color with thickness of 4 below the school name.
______________________________________________________________________________
c) What is the correct HTML tag for a new paragraph, he is confused with <p> or <br> tag?
______________________________________________________________________________
______________________________________________________________________________
e) Which tag he should you use to create a hyperlink from home page to another page?
______________________________________________________________________________