Sample Questions and Exercises 2016 Oct
Sample Questions and Exercises 2016 Oct
True-False
Answer: False
Answer: True
3. Text files are recognized as web pages when their file names end with .html or .htm.
Answer: True
Answer: False
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
Answer: True
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
Answer: True
Answer: True
Answer: False
19. Links to web pages other than your own should be relative links.
Answer: False
Answer: False
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?
Answer: False
Answer: True
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
a) <table></table>
b) <tr></tr>
c) <td></td>
d) <cell></cell>
Answer: c) <td></td>
a) <td></td>
b) <td> </td>
c) <td blank></td>
d) <td>0</td>
Answer: b) <td> </td>
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
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
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>
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>
a) web server
b) web site
c) web master
d) web browser
Answer: b) saves a copy of web pages for faster viewing the next time it’s called.
a) <web>, </web>
b) <page>, </page>
c) <webpage>, </webpage>
d) <html>, </html>
====================================================
1.What is the World Wide Web (WWW)?
Answer: A large collection of public documents distributed over a network of millions of computers.
Answer: A computer that stores documents and makes them available (serves them up) via a network.
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.
Answer: It is a service that lets you obtain space on a Web server under your own personal domain name.
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.
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.
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.
<html xmlns="http://www.w3.org/1999/xhtml">
<head> <title>Title of document</title> </head>
<!DOCTYPE html>
<html lang="en">
<head> <meta charset="utf-8"/> </head>
font
<font face="Times New Roman">Example</font>
Anchor tag
<a href="http://www.shouket.com/"> Visit Our Site</a>
src, alt
<body> tag
bgcolor, text
</ol>
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>
<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>
</body>
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
Ans. C, E, D, B, A
III. ”0” C. frameset attribute to set the horizontal space for a frame
V. rows E. frameset border attribute value to not have borders around a frame
Answer: D, A, E, C, B
ii. To display multiple documents on the same page, you can use: Frames
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.
IX. External CSS keeps your website design and content separate.