Class 7 Computer Science Hyper Text Markup Language Notes
Class 7 Computer Science Hyper Text Markup Language Notes
com
Lesson-2
Hyper Text Markup Language (HTML)
m
co
HTML:
You will learn
.
HTML is the building block for web pages.
ay
Prerequisites: You will need a text editor,
d
such as Notepad and an Internet browser, Heading (H1 to H6)
<Br>, <hr>
to
such as Internet Explorer or Netscape. ,<comment>
Background Color
es
,font tag(size, face,
What is an html File? color)
di
i. HTML is a format that tells a computer Text alignment
(center, left , right)
tu
Tag Description
m
co
<head>...</head>This tag represents the document's header which can keep other HTML tags like
<title>, <link> etc.
.
ay
<title> The <title>tag is used inside the <head> tag to mention the document title.
d
to
<body> This tag represents the document's body which keeps all the contents of a web page- text,
es
images, sound etc.
di
Like <H1>,<H2>……..<H6>
w
w
<br> This tag is used to insert new line or insert enter in html
ht
Bold, Italics, Underline :<b> tag is used to make a text bold in html.
m
1.click Start-> All Programs->Accessories. Open notepad and type the code given below
co
<html>
.
ay
<head>
d
<title>My First Webpage
to
</title> es
</head>
di
<body>
tu
</body>
</html>
Assignment Question
Q. Write the code to create the following Webpage with background color ‘green’ and text color ‘red’
m
co
My School
.
ay
Im a student of K.V,NFR Maligaon. I read in class 7.
d
to
es
di
<html>
tu
<head>
.s
w
<title>My Webpage
w
</title>
//w
</head>
s:
</body>
</html>
Q. Write an html code to show the working of various Paragraph alignment tags
<head>
<title>
Paragraph in html
m
</title>
co
</head>
.
<body>
ay
This is an html document.
d
to
<p align=left>This is a left paragraph in html </p> es
<p align=right>This is a right paragraph in html </p>
di
<p align=center>This is a center paragraph in html </p>
tu
</body>
.s
</html>
w
We can insert images to our Html pages to make it look more beautiful. <img> tag is used to insert
images in webpage. There are two ways to insert images in a webpage:
s:
1. Internal:
tp
Steps: 1. Open My Pictures or Sample Pictures or any folder containing pictures Copy the
ht
<html>
<head>
<title>
m
Webpage with Pictures
co
</title>
.
</head>
ay
<body bgcolor="yellow">
d
to
<img src=Name of image.jpg> es
</body></html>
di
4.Save the file giving a name with dot html(mypage.html).
tu
2. External: Here we type the location or address of the picture where it is, instead of simply
w
Steps:
<html>
<head>
</title>
</head>
m
<body bgcolor="yellow">
co
<img src=c:\Windows\Web\Wallpaper\Name of image.jpg>
.
</body>
ay
</html>
d
to
2.Save the file giving a name with dot html(mypage.html).
SUMMARY
w
//w
1. HTML is a format that tells a computer how to display a web page; it is the building block for
web pages.
s:
m
EXERCISES
. co
A. Fill in the blanks
ay
i. _____________ is the building block of HTML
d
ii. HTML document must have .html or ___________ extensions.
to
iii. _____________tag is used to write line or text in center.
es
iv. _____________tag is used to set paragraph.
v. To insert image ___________tag is used.
di
tu
iii. <p> tag is used to insert new line or insert enter in HTML.
w
i. What is HTML?
ii. Name any two attributes used with the BODY tag.?
iii. Write the HTML code to set the background color to yellow.?
iv. How would you insert image in an Html document?
v. What does the ‘n’ in the <Hn> tag indicate?
m
. co
ay
In the lab
d
to
1. Ankita has made the HTML document shown below, which displays headings in different
es
Sizes. Write the HTML code for creating a similar document.
di
tu
.s
w
w
//w
s:
tp
ht
2. Anita wants to create simple Web page on Input devices. Help her by listing the steps required
for creating the web page.