10th Computer Chapter 7
Chapter 7: Worldwide Web and HTML

Write short answers to the following questions
i. Differentiate between Website and Webserver
Answer
| Website | Web Server |
| A website is a collection of related Web pages hosted on a Web server. It is accessible through an Internet address known as Uniform Resource Locator (URL). | A web server is a computer that makes Web pages available through the Internet. Web servers are used to host websites. |
ii. Describe how a search engine is used for searching information on the internet.
Answer
Finding exactly what the user is looking for is not easy with billions of We, pages on the Web. Therefore, search engines have been designed to help users find specific information on the Web. Users type in one or more Keywords in a search engine. The search engine will look for matching websites from all over the Web.
iii. Define URL and Web hosting.
Answer
URL
URL stands for Uniform Resource Locator. URL is the address of a file or resource on the Web. When the user types the URL of a website in the browser it retrieves the Web pages of that site.
Web Hosting
Web hosting is a service that uploads a website on a Web server and makes it available for computer users. It makes the website run on a computer all the time that is connected to the Internet.
iv. Describe HTML.
Answer
HTML stands for Hypertext Mark-up Language. It is called mark-up language because it uses mark-up tags that tell the Web browser how to display the Web page. It is the language of the Internet’s World Wide Web. Websites and Web pages are written in HTML.
v. What is a hyperlink?
Answer
A hyperlink is a text or image in a Web page that links it to another Web page or another section of the same page when the user clicks on it. Hyperlinks are usually blue and underlined.
When the reader moves the pointer over a hyperlink, the pointer changes to a small hand. Clicking on it allows the reader to jump from page to page.
EXTENSIVE QUESTIONS
Q3. Describe any four types of websites.
Answer
Types of websites
- Web Portals
Web portal is a website that offers a large variety of services. These include online shopping malls, news, stock prices, e-mail, search engines, etc. Web portals function as a point of access to information on the Web.
Example
A school Web portal delivers information about the school’s historical background, admission requirements, school curriculum, tuition fee structure, school news, student results, etc., in a unified way.
- News Websites
News websites provide information about current events and opinions. These sites publish news stories and let their visitors’ voices be heard. These sites provide their visitors with a way to get their thoughts and views published. Very often at the end of news stories, visitors are asked to share their experience or knowledge about the topic. Therefore, a link for the reader’s comments is provided for feedback.
Examples
Some examples of news websites are:
i. www.paktribune.com
ii.www.dailytimes.com
iii. www.thenews.com.pk
- Informational Websites
Informational websites provide information on any topic in the form of text graphics, sound and videos.
Examples
www.wikipedia.org is an informational website that provides information on thousands of articles. It allows users to contribute and edit articles as well. As another example, www.ask.com is another informational website that provides information on a large variety of topics including arts and humanities, automotive, animals, business, computer and literature, beauty and personal care, health, real estate, education, etc.
- Educational Websites
Educational websites are created for educational purposes. These sites contain animation, slide presentations and tutorials to educate people on various topics. Information is presented in a very well-organized way. The purpose of any educational website is to impart knowledge to people who are looking for a better understanding of a topic and pursue knowledge.
Examples
Some examples of Pakistani educational websites are:
Q4. Write the HTML tags for the following
i. Paragraph
ii. Heading
iii. Underline
iv. italic
v. Center text
vi. Strikeout
vii. Bold
viii. Superscript
ix. Subscript
x. Font size, colour and typeface
Answer
i. Paragraph
The <p></p> tags are used to define paragraphs. HTML automatically adds an extra blank line before and after a paragraph.
ii. Headings
There are six heading tags, <h1></h1> to <h6></h6>. The <h1></h1> tags are used to specify the largest heading and <h6></h6> tags specify the smallest.
iii. Underline <u></u>
These tags will underline the text that is within the tags.
Example
<u>Please Note:</u>
Result:
Please Note:
iv. Italic <i></i>
These tags are used to make the text italic that is within the tags.
Example
<i>I Love Pakistan</i>
Result:
I Love Pakistan
v. Center <center> </center>
These tags will make the text centered that is within the tags, the text will appear in the middle of the left and right margins.
Example
<center>UNIT 2 PROGRAMMING IN C</center>
Result:
UNIT 2 PROGRAMMING IN C
vi. Strike-out <strike> </strike>
These tags will put a line right through the centre of the text that is within the tags. This is known as strike-out.
Example
<strike>Obsolete Computer Devices</strike>
Result
Obsolete Computer Devices
vii. Bold <b> </b>
These tags will make the text bold that is within the tags.
Example
<b>Chapter 5 Output Devices</b>
Result:
Chapter 5 Output Devices
viii. Superscript <sup></sup>
These tags are used to convert the text to superscript that is within the tags.
Example
X<sup>Y</sup>
Result:
XY
ix. Subscript <sub></sub>
These tags are used to convert the text to a subscript that is within the tags.
Example X<sub>5</sub>
Result: X5
x. Font size, colour and typeface
Font Size <font size=?> </font>
These tags are used to change the font size. Replace the? symbol with a number in the range 1 to 7. One is the smallest and seven is the largest font size.
Example
<font size=3>Types of Computers</font>
Result: Types of Computers
Font Color <font color=?> </font>
These tags are used to change the colour of the text that is within the tags. Replace the? symbol with colours such as black, blue, Drown, grey, green, maroon, orange, pink, red, white, yellow, etc.
Example <font color=red>Laptop Computer</font>
Result: Laptop Computer
Font typeface <font </font>
These tags are used to change the font face of text that is within the tags Replace the? symbol with font faces such as Arial, Courier, Calibri, New Times Roman, etc.
Example <font face=arial>FORMATTING TAGS</font>
Result: FORMATTING TAGS
Q5. Create a Web page in HTML that displays an image of a computer. The width of the image should be 350 pixels and height 220 pixels.
Answer
HTML Code
<html>
<head>
<title>Sample Page</title>
</head>
<body>
<img src=”computer.png” alt=”Computer Image” style=”width: 350px; height: 220px; >
</body>
</htmi>
Q6. Describe how background colour and image are applied to a Web page.
Answer
To apply a background colour
To apply a background colour to a web page, insert the bgcolor attribute and insert the text attribute in the <body> tag.
To apply an image
An image can be set as the background of a page using the background attribute in the <body> tag.
<body background = “image.jpg”>
If the image is smaller than the browser window then it will repeat itself till the entire window is filled.
Q7. Create an HTML document that contains a graphical hyperlink.
Answer
HTML document having a graphical hyperlink
The syntax for creating a graphical hyperlink to another web page is:
<a href= “url”><img scr=”name of image file></a>
Example
<a href=”http://www. fbise.edu.pk”><img src= “image. jpg” ></a>
It will display the image.jpg image file in the browser window. When the reader, moves the mouse pointer over the image, it will change to a small hand and clicking on the image will open the Federal Board website that has the URL www.fbise.edu.pk.
Q8. Describe the tags used for creating a table in HTML.
Answer
Tags used for Creating Table
The following tags are used for creating a table:
| <table></table> | These tags are used to create a table |
| <tr></tr> | These tags define a row |
| <td> </td> | These tags define data cells. The column of each row is called a data cell. A data cell can contain text, images, paragraphs, etc. |
Cell Spacing & Cell Padding
Cell Spacing is the space between the cells of the table and cell padding is the space between the text and the border of the cell.
The space between the cells and also the space between the text and the border of the cells has decreased to default values.
In the HTML document, the code for creating the heading of each column of the second row is given below.
<tr>
<td>S.No.</td>
<td>Date</td>
<td>Class IX</td>
<td>Class X</td>
</tr>
The text of all four cells of the second row is within the <tr></tr> tags and the text of each cell is within the <td></td> tags. The text of the next three rows is also defined in the same way.
Code for the First Row
The code for the first row that contains the title is:
<tr>
<td colspan=4 align=center>
<b>FINAL EXAMINATIONS 2011-2012</b></td>
</tr>
Here, the colspan attribute is used to combine the four columns and the align attribute centres the table. The user can also use the row span attribute to combine the cells of rows of a table. The align attribute is used to align the title in the centre of the row. The title can also be aligned to the left or right.
Select the best answer for the following MCQs.
i. What is an internet address called that identifies a website?
A. Web page
B. Website
C. Web server
D. URL
ii. What is a collection of Web pages hosted on a Web server called?
A. Web address
B Website
C. Home page
D. Web browser
iii. Which language is used for creating Web pages?
A. HTML
B. C language
C. URL
D. Web browser
iv. What is text or image in a Web page called that links it to another Web page when the user clicks on it?
A. weblink
B. browser link
C. hyperlink
D. search link
v. Which of the following refers to uploading Web pages to a Web server so that others can access it?
A. Configuring Web pages
B. Web surfing
C. Installing website
D. Web hosting
vi. How many types of lists are commonly used in HTML pages?
A. 2
B. 3
C. 4
D. 5
vii. Anything typed inside which tags are displayed in the browser window?
A. <body> </body>
B. <html> </html>
C. <head> </head>
D. <title> </title>
viii. Which of the following tags does not have a closing tag?
A. <tr
B. <br>
C. <center>
D. <li>