CS202 Mid Term Past Paper
Q#1: What does HTML stand for?
(A) Hyper Text Markup Language
(B) Hyperlinks and Text Markup Language
(C) Home Tool Markup Language
Answer: (A) Hyper Text Markup Language
Q#2: Who is making the Web standards?
(A) Microsoft
(B) The World Wide Web Consortium
(C) Google
(D) Mozilla
Answer: (B) The World Wide Web Consortium
Q#3: Choose the correct HTML element for the largest heading.
(A) <h1>
(B) <h6>
(C) <head>
(D) <heading>
Answer: (A) <h1>
Q#4: What is the correct HTML element for inserting a line break?
(A) <lb>
(B) <br>
(C) <break>
Answer: (B) <br>
Q#5: What is the correct HTML for adding a background color?
(A) <background>yellow</background>
(B) <body style=”background-color:yellow;”>
(C) <body bg=”yellow”>
Answer: (B) <body style=”background-color:yellow;”>
Q#6: Choose the correct HTML element to define important text.
(A) <strong>
(B) <important>
(C) <b>
(D) <i>
Answer: (A) <strong>
Q#7: Choose the correct HTML element to define emphasized text.
(A) <i>
(B) <em>
(C) <italic>
Answer: (B) <em>
Q#8: What is the correct HTML for creating a hyperlink?
(A) <a name=”http://www.vukiduniya.blogspot.com”> VuKiDuniya.com</a>
(B) <a>http://www.vukiduniya.blogspot.com</a>
(C) <a url=”http://www.vukiduniya.blogspot.com”> VuKiDuniya.com</a>
(D) <a href=”http://www.vukiduniya.blogspot.com”>Vu Ki Duniya</a>
Answer: (D) <a href=”http://www.vukiduniya.blogspot.com”>Vu Ki Duniya</a>
Q#9: Which character is used to indicate an end tag?
(A) ^
(B) /
(C) <
(D) *
Answer: (B) /
Q#10: How can you open a link in a new tab/browser window?
(A) <a href=”url” target=”new”>
(B) <a href=”url” new>
(C) <a href=”url” target=”_blank”>
Answer: (C) <a href=”url” target=”_blank”>
Q#11: Which of these elements are all <table> elements?
(A) <table><tr><tt>
(B) <thead><body><tr>
(C) <table><tr><td>
(D) <table><head><tfoot>
Answer: (C) <table><tr><td>
Q#12: How can you make a numbered list?
(A) <list>
(B) <dl>
(C) <ol>
(D) <ul>
Answer: (C) <ol>
Q#13: How can you make a bulleted list?
(A) <ol>
(B) <dl>
(C) <ul>
(D) <list>
Answer: (C) <ul>
Q#14: What is the correct HTML for making a checkbox?
(A) <input type=”checkbox”>
(B) <check>
(C) <input type=”check”>
(D) <checkbox>
Answer: (A) <input type=”checkbox”>
Q#15: What is the correct HTML for making a text input field?
(A) <textfield>
(B) <input type=”textfield”>
(C) <input type=”text”>
(D) <textinput type=”text”>
Answer: (C) <input type=”text”>
Q#16: What is the correct HTML for making a drop-down list?
(A) <input type=”list”>
(B) <list>
(C) <select>
(D) <input type=”dropdown”>
Answer: (C) <select>
Q#17: What is the correct HTML for making a text area?
(A) <input type=”textarea”>
(B) <textarea>
(C) <input type=”textbox”>
Answer: (B) <textarea>
Q#18: What is the correct HTML for inserting an image?
(A) <img src=”image.gif” alt=”MyImage”>
(B) <image src=”image.gif” alt=”MyImage”>
(C) <img alt=”MyImage”>image.gif</img>
(D) <img href=”image.gif” alt=”MyImage”>
Answer: (A) <img src=”image.gif” alt=”MyImage”>
Q#19: What is the correct HTML for inserting a background image?
(A) <body style=”background-image:url(background.gif)”>
(B) <body bg=”background.gif”>
(C) <background img=”background.gif”>
Answer: (A) <body style=”background-image:url(background.gif)”>
Q#20: Which HTML element defines the title of a document?
(A) <head>
(B) <title>
(C) <meta>
Answer: (B) <title>
Q#21: Which HTML attribute specifies an alternate text for an image if the image cannot be displayed?
(A) longdesc
(B) title
(C) src
(D) alt
Answer: (D) alt
Q#22: Which doctype is correct for HTML5?
(A) <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 5.0//EN”>
(B) <!DOCTYPE html>
(C) <!DOCTYPE HTML5>
Answer: (B) <!DOCTYPE html>
Q#23: Which HTML element is used to specify a footer for a document or section?
(A) <section>
(B) <bottom>
(C) <footer>
Answer: (C) <footer>
Q#24: What is the correct HTML element for playing video files?
(A) <movie>
(B) <media>
(C) <video>
Answer: (C) <video>
Q#25: What is the correct HTML element for playing audio files?
(A) <audio>
(B) <sound>
(C) <mp3>
Answer: (A) <audio>
Q#26: The HTML global attribute “contenteditable” is used to:
(A) Specify whether the content of an element should be editable or not
(B) Return the position of the first occurrence of content inside a string
(C) Specifies a context menu for an element
(D) Update content from the server
Answer: (A) Specify whether the content of an element should be editable or not
Q#27: In HTML, onblur and onfocus are:
(A) Event attributes
(B) HTML elements
(C) Style attributes
Answer: (A) Event attributes