0% found this document useful (0 votes)
26 views12 pages

Sample Questions and Exercises 2016 Oct

The document contains a series of true-false and multiple choice questions about topics related to web design and development. There are over 25 questions testing knowledge of HTML, CSS, URLs, domains, and other web technologies. Answers are provided for each question.

Uploaded by

dzfg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views12 pages

Sample Questions and Exercises 2016 Oct

The document contains a series of true-false and multiple choice questions about topics related to web design and development. There are over 25 questions testing knowledge of HTML, CSS, URLs, domains, and other web technologies. Answers are provided for each question.

Uploaded by

dzfg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Sample Questions

True-False

1. A web site is one web page written by one person.

Answer: False

2. DNS stands for Domain Name Server.

Answer: True

3. Text files are recognized as web pages when their file names end with .html or .htm.

Answer: True

4. The title element should be placed within the body element.

Answer: False

5. A browser-specific extension is always good to use.

Answer: False

6. You can add a background to your web page by adding the bg attribute to your body tag.

Answer: False

7. You can use any image you find on the Web without asking permission.

Answer: False

8. If you want text to stop flowing around an image, you can use <br clear=”center”>.

Answer: True

9. If you don’t want to worry about relative paths, just keep all of your HTML and image files in a single dire
ctory.

Answer: True

10. A progressive JPEG is about the same as an interlaced GIF.

Answer: True

11.A link label is always an URL.

Answer: False

12. It's very important to remember to close the anchor tag (</a>).

Answer: True
13. You can usually omit the file name "index.html" when creating an absolute link.

Answer: True

14. When you use the frameset element on a Web page, you don't need a body element.

Answer: True

15. It's not necessary to add the closing frameset element (</frameset>).

Answer: False

16. Like tables, frames can be nested.

Answer: True

17. Deep linking should be avoided.

Answer: True

18. In frames, the border attribute can be defined as a percentage.

Answer: False

19. Links to web pages other than your own should be relative links.

Answer: False

20. It's not important to remember to close your FTP connection.

Answer: False

21. Netscape Communicator's Composer is an example of a web construction kit.

Answer: True.

22. If you overwrite an old file on a web server with a new one, you can easily recover a copy of the old file.

Answer: False

23. It's important to double-check your Web pages and links after you upload them to the server.
Answer: True

24. Header HTML5 element is used to configure the main navigation area on a web page.
Answer: False

25. All of the widgets, or components of a form are defined in the content of a <form> tag
Answer: True

26. The HTML <canvas> element is used to draw graphics, on the fly, via JavaScript.
Answer: True

Multiple choices
What information do you need before you can upload your Web pages to the server?

a) Your User ID and password


b) Host address for the web server
c) Directory path to your web directory on the web server
d) All of the above

Answer: d) All of the above


You can't change the background color of a table.

Answer: False

2. Text and images can be used within tables.

Answer: True

3. The rowspan and colspan attributes are interchangeable.

Answer: False

4. A large table with lots of rows are better than several smaller tables.

Answer: False

5. The summary attribute of the table element provides a brief description of the table for nonvisual browsers.

Answer: True

1. Which set of tags define a cell within a table?

a) <table></table>
b) <tr></tr>
c) <td></td>
d) <cell></cell>

Answer: c) <td></td>

2. If you want to have a blank cell, the correct code would be

a) <td></td>
b) <td>&nbsp;</td>
c) <td blank></td>
d) <td>0</td>

Answer: b) <td>&nbsp;</td>

3. The colspan attribute can be used with which set of tags?

a) <td></td>
b) <cell></cell>
c) <tr></tr>
d) <table></table>

Answer: a) <td></td>

4. If you want to make a table have a background color, which attribute do you use?

a) tbackground
b) tablebackground
c) background
d) bgcolor
Answer: d) bgcolor

5. Which attribute do you use to make text within a cell always start at the top of the cell?

a) align=top
b) align=start
c) valign=top
d) valign=start

Answer: c) valign=top

4. Forcing linked page to open in a new window is always a good idea.

Answer: False

5. When you get a "404 - Page Not Found" error, the page may have moved or you may have typed the URL i
n wrong.

Answer: True

Which of the following is a link to a named anchor?

a) <a href="books.html">books</a>
b) <a href="#books">books</a>
c) <a href="http://www.books.com">books</a>
d) <a name="books">books</a>

Answer: b) <a href="#books">books</a>

Which code is the proper way to link to a named anchor on another page within the same Web site?

a) <a name="stern">Stern</a>
b) <name="stern">Stern</a>
c) <a href="books.html" name="stern">Stern</a>
d) <a href="books.html#stern">Stern</a>

Answer: d) <a href="books.html#stern">Stern</a>


Multiple Choice

1. The person who maintains a web site is called a

a) web server
b) web site
c) web master
d) web browser

Answer: c) web master

2. What does URL stand for?

a) Uniform Resource Locator


b) Uniform Resource Language
c) United Resource Language
d) United Relative Locator

Answer: a) Uniform Resource Locator

3. The web browser’s cache

a) contains extra features to install.


b) saves a copy of web pages for faster viewing the next time it’s called.
c) should never be used.
d) is the cost of the browser

Answer: b) saves a copy of web pages for faster viewing the next time it’s called.

4. What tag set opens and closes a web page?

a) <web>, </web>
b) <page>, </page>
c) <webpage>, </webpage>
d) <html>, </html>

Answer: d) <html>, </html>

5. What is the W3C?

a) Has the authority to set industry standards


b) World Wide Web Consortium
c) Establishes new standards for HTML
d) All of the above

Answer: d) All of the above

7.Which tag is correct for scaling an image?

a) <img src=”cat.gif” scale=”50x50” alt=”My cat”>


b) <img src=”cat.gif” scale=”50”,”50” alt=”My cat”>
c) <img src=”cat.gif” width=50 height=50 alt=”My cat”>
d) <img src=”cat.gif” alt=”My cat”>

Answer: c) <img src=”cat.gif” width=50 height=50 alt=”My cat”>

8.Why should you always use a closing paragraph tag?

a) The paragraph won’t appear if you don’t.


b) Only parts of the paragraph will appear.
c) Your web page will be one giant paragraph.
d) XML and XHTML require closing tags.

Answer: d) XML and XHTML require closing tags.

====================================================
1.What is the World Wide Web (WWW)?

Answer: A large collection of public documents distributed over a network of millions of computers.

2. What is a web server?

Answer: A computer that stores documents and makes them available (serves them up) via a network.

How is the <br> tag different from the <p> tag?

Answer: No blank line and no closing <br> tag.

3.Why should you always include the width and height attributes inside the img tag?

Answer: The web browser will know what size the images are going to be, reserve space for them and place the text
on the reserved space. Thus users can read the text while the images are loading.

4.What is a virtual domain hosting service?

Answer: It is a service that lets you obtain space on a Web server under your own personal domain name.

5.What does an absolute URL link to verses a relative Web server?

Answer: An absolute URL links to a page on a different Web server whereas a relative URL links to a page on the s
ame Web server.

6.What is the difference between a server-side image map and a client-side image map?

Answer: Server-side image maps required a special program on the Web server while client-side image maps are ha
ndled by the Web browser.

7.What does the noresize attribute do?


Answer: It prevents visitors from resizing the frame.

8.What is the difference between a server-side image map and a client-side image map?

Answer: Server-side image maps required a special program on the Web server while client-side image maps are ha
ndled by the Web browser.

9. What advances and features does HTML5 offer?

HTML5 introduces features such as video playback and drag-and-drop that in the past were provided by plug-ins lik
e Adobe Flash. It uses the newest version of Cascading Style Sheets (CSS3) and JavaScript, and another new tool, H
TML5 Canvas, that can be used to render simple animations, which reduces page-load time. HTML5 also provides d
evice independence for mobile applications, and can more easily access the built-in functionality of mobile devices,
including GPS and swiping. HTML5 mobile apps work just like Web pages.

10. What are the minimum required tags for XHTML ?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head> <title>Title of document</title> </head>

<body> some content </body> </html>

11. Write the Basic Structure of an HTML5 Document?

<!DOCTYPE html>
<html lang="en">
<head> <meta charset="utf-8"/> </head>

<body> … </body> </html>

1. What are the HTML tags of following?

font
<font face="Times New Roman">Example</font>

Anchor tag
<a href="http://www.shouket.com/"> Visit Our Site</a>

Textarea <textarea> </textarea>


Horizontal line </hr>

2. Write any two attributes for following HTML tags

a). <image> tag

src, alt

<body> tag

bgcolor, text

3. Give an example of ordered list with Capital Letters ?

<ol type="A" >

<li>List item 1</li>

<li>List item 2</li>

<li>List item 3</li>

<li>List item 4</li>

</ol>

4. Write The Most Important Differences of XHTML from HTML?

XHTML elements must be properly nested

XHTML elements must always be closed

XHTML elements must be in lowercase

XHTML documents must have one root element

5. Write the HTML code needed for a website that displays the Table using CSS?

<html>
<head>
<style type="text/css">
.style1
{
height: 82px; }
</style>
</head>
<body>

<table style="width: 99%;" border="2">


<tr>
<td class="style"> welcome
</td>
<td class="style"> marhaba </td>

</tr> </table> </body></html>

6. Write the JavaScript function for prompt Box?

<head>
<script type="text/javascript">
function show_prompt()
{
var name=prompt("Please enter your name","Harry Potter");
if (name!=null && name!="")
{
document.write("Hello " name "! How are you today?");
}
}
</script>
</head>
<body>

<input type="button" onclick="show_prompt()" value="Show prompt box" />

</body>

8. Identify the following statements as true or false:-


1. A very large Web site may be spread over a number of servers in different geographic
locations. T
2. An external style sheet is ideal when the style is applied to many pages T
3. An Internal style sheet should not be used when a single document has a unique style F

9. Match the following terms to their meanings:

I. _self A. invalid target value for base tag

II. _parent B. send linked content to the top frame of the current window

III. _blank C. send linked content to the same frame as the link is in

IV. _top D. send the content to a new window

V. _home E. send linked content to the predecessor document of the frameset

Ans. C, E, D, B, A

10. Match the following terms to their meanings:

I. <frameset> A. tag used to add content to a frameset

II. <frame> B. frameset attribute to set vertical height of a frame

III. ”0” C. frameset attribute to set the horizontal space for a frame

IV. cols D. tag used to arrange presentation of frames

V. rows E. frameset border attribute value to not have borders around a frame

Answer: D, A, E, C, B

11.Fill in the Blanks

i. An Event is an action which the user performs such as clicking a button

ii. To display multiple documents on the same page, you can use: Frames

Iii. Bgcolor sets the background color of tables and cells

iv. …JavaScript ……allows users to interact with a Web page without the use of a server.

V. You can use ….JavaScript … to create rollovers, to validate data entered into a form
field , to create a pop-up window.
VI. XHTML documents must have one root element.

VII. XHTML is HTML defined as an XML application.

VIII. <cite> , <code> , <em> are HTML Logical Tags.

IX. External CSS keeps your website design and content separate.

You might also like