Download as pdf or txt
Download as pdf or txt
You are on page 1of 60

1. .

HTML stands for


A. Hyper Text Markup Language
B. Hyper Text Machine Language
C. Hyper Technical Machine Language
D. None of these
View Answer

2. In which year HTML was invented?


A. 1990
B. 1991
C. 1992
D. 1993
View Answer
Ans : D

Explanation: The first version of HTML was written by Tim Berners-Lee in 1993.

3. Which of the following is not correct with reference to HTML?


A. DOCTYPE refers to document type.
B. DOCTYPE is not case sensitive.
C. DOCTYPE is used only once at the start of the document.
D. None of the above
View Answer
Ans : D

Explanation: DOCTYPE in HTML has all the above 3 properties.

4. HTML tags are represented within


A. <>
B. ()
C. []
D. {}
View Answer
Ans : A

Explanation: HTML tags are enclosed with <>. eg, paragraph tag is written as
5. Drag and drop feature is supported in
A. HTML5
B. HTML4
C. Both HTML4 and HTML5
D. It is not supported at all.
View Answer
Ans : A

Explanation: Drag and drop is supported in HTML5 but not in HTML4.

6. What if one does not use the doctype in the starting of HTML
document?
A. Browser finds the document in quirky mode
B. Browser finds a document in standard mode
C. Browser stops working
D. Browser crashes after showing the page View Answer
View Answer
Ans : A

Explanation: If the browser finds <!doctype html> in the starting of an HTML document it
sets the document in standard mode but if one does not use a doctype, the browser goes to
quirky mode.

7. Which element is design to wrap a single piece of information?


A. <time>
B. <nav>
C. <footer>
D. <header>
View Answer
Ans : A

Explanation: <time> tag wrap single piece of information i.e. it defines date, month and
year.
8. The __________ attribute sets the text direction as related to the lang
attribute.
A. lang
B. sub
C. dir
D. ds
View Answer
Ans : C

Explanation: The dir attribute specifies the text direction of the element's content. List of
directory files is given by dir tag which is not supported in HTML5.

9. To create HTML page, you need


A. Web browser
B. text editor
C. Both A and B
D. None of the above
View Answer
Ans : C

Explanation: To create HTML page, you need Web browser and text editor.

10. Who is Known as the father of World Wide Web (WWW)?


A. Robert Cailliau
B. Tim Thompson
C. Charles Darwin
D. Tim Berners-Lee
View Answer
Ans : D

Explanation: Tim Berners-Lee is Known as the father of World Wide Web (WWW)
1. Choose the correct option.
A. Elements in HTML describes the way of presenting the content in the
browser.
B. All elements must have atleast one attribute associated with it.
C. Both a and b.
D. None of the above
View Answer
Ans : A

Explanation: Elements in HTML may or may not have an attribute.

2. In HTML, <ul> means


A. Underline
B. Unique list.
C. Unordered list.
D. None of the above
View Answer
Ans : C

Explanation: <ul> is used for listing thins an unordered manner.

3. Which one of the following options is correct?


A. Both block element and inline element start in the new line.
B. Both block element and inline element start in the same line
C. Only inline element starts in new line.
D. Only block element starts in new line.
View Answer
Ans : D

Explanation: Block element starts in a new line while inline elements start in the same line.

4. Which of the following is a block element?


A. <b>
B. <i>
C. <p>
D. <u>
View Answer
Ans : C

Explanation: <p> is a block element in HTML.

5. Which of the following is an inline element?


A. <p>
B. <h1>
C. <div>
D. <s>
View Answer
Ans : D

Explanation: <s> is an inline element in HTML.

6. Choose the appropriate tag to get the content in browser as follows:

<html>

<body>

______

Johny Johny!

Yes Papa

______

</body>

</html>

Johny Johny!

Yes Papa
A. <p>
<p>
B. <pre>
</pre>
C. <s>
</s>
D. <b>
</b>
View Answer
Ans : B

Explanation: <pre> tag is used to retain the spaces as well as a new line of the content as it
is.

7. Which one of the following is the least significant heading tag?


A. <h1>
B. <h3>
C. <h5>
D. <h6>
View Answer
Ans : D

Explanation: HTML headings range from <h1> to <h6>,among which <h6> is the least
significant.

8. Which one of the following is the most significant heading tag?


A. <h1>
B. <h3>
C. <h5>
D. <h6>
View Answer
Ans : A

Explanation: HTML headings range from <h1> to <h6>,among which <h1> is the most
significant.

9. Choose the correct option.


A. HTML elements are represented within tags.
B. HTML tags are case insensitive.
C. While executing an HTML document, browser do not display the tags.
D. All of the above
View Answer
Ans : D

Explanation: All the above three statements are correct with respect to HTML tags.

10. Fill in the blank so that the browser display- Charge of elctron is
1.602x10^(-19) on exexcuting the HTML document?

<!DOCTYPE html>

<html>

<body>

__________________

</body>

</html>

A. Charge of elctron is 1.602x10-<sup>19</sup>


B. Charge of elctron is 1.602x10<sup>-19</sup>
C. Charge of elctron is 1.602x10-<sub>19</sub>
D. Charge of elctron is 1.602x10<sub>-19</sub>
View Answer
Ans : B

Explanation: The content written between <sup> and </sup> gets superscripted.

1. How many core attributes that can be used on the majority of HTML
elements?
A. 1
B. 2
C. 3
D. 4
View Answer
Ans : D

Explanation: The four core attributes that can be used on the majority of HTML elements
(although not all) are : Id, Title, Class and Style

2. The ______ attribute of an HTML tag can be used to uniquely identify


any element within an HTML page.
A. Title
B. id
C. Class
D. Style
View Answer
Ans : B

Explanation: The id attribute of an HTML tag can be used to uniquely identify any element
within an HTML page.

3. The title attribute gives a suggested title for the element.


A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A

Explanation: True, The title attribute gives a suggested title for the element.

4. How many internationalization attributes there?


A. 1
B. 2
C. 3
D. 4
View Answer
Ans : C

Explanation: There are three internationalization attributes, which are available for most
(although not all) XHTML elements : Dir, lang and xml:lang

5. The _________ attribute allows you to indicate to the browser about the
direction in which the text should flow.
A. lang
B. xml:lang
C. both a and b
D. dir
View Answer
Ans : D

Explanation: The dir attribute allows you to indicate to the browser about the direction in
which the text should flow.

6. The value of the xml:lang attribute should be an ________ country code.


A. ISO-638
B. ISO-639
C. ISO-640
D. ISO-641
View Answer
Ans : B

Explanation: The xml:lang attribute is the XHTML replacement for the lang attribute. The
value of the xml:lang attribute should be an ISO-639 country code

7. What can be used to verify a displayed graphics?


A. Property checkpoints
B. Region checkpoints
C. On-Screen Action
D. Local STorage
View Answer
Ans : B

Explanation: Region checkpoints are used to verify a displayed graphics. It is a kind of test
operation which gives verification of application’s window or control is displayed correctly or
not. Object’s property is verified by region checkpoints which is test operation. Local storage
is for storing data.

8. Which of the following does not lie under the attribute of <input> and
is not supported by Opera?
A. url
B. time
C. tel
D. option
View Answer
Ans : D

Explanation: <input> element type has new values as url, email, datetime, date, month, tel,
time, number, search, color, range, datetime-local, week.

9. What does wrap attribute denote?


A. Whether the text is in bold
B. Whether the text is wrapped
C. Whether the text is in italics
D. Whether the text is highlighted
View Answer
Ans : B

Explanation: wrap is the attribute of <textarea> element and it indicates whether the text
should be wrapped. Syntax: <textarea wrap=""> if we use wrap=”hard” it will contain
newlines in the submission of a form. This attribute is newly introduced by HTML5 and is
supported by all the browsers.

10. The lang attribute allows you to indicate the main language used in a
document.
A. Yes
B. No
C. Can be yes or no
D. Can not say
View Answer
Ans : A
Explanation: Yes, The lang attribute allows you to indicate the main language used in a
document, but this attribute was kept in HTML only for backwards compatibility with earlier
versions of HTML.

1. The _______ tag offers a way to structure your text into different
paragraphs.
A. h
B. p
C. p2
D. h5
View Answer
Ans : B

Explanation: The p tag offers a way to structure your text into different paragraphs.

2. You can use ___________ tag to put any content in the center of the page
or any table cell.
A. title
B. head
C. center
D. meta
View Answer
Ans : C

Explanation: You can use center tag to put any content in the center of the page or any
table cell.

3. Horizontal lines are used to visually break-up sections of a document.


A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A

Explanation: True, Horizontal lines are used to visually break-up sections of a document.

4. _______ tag is an example of the empty element.


A. img
B. div
C. p
D. hr
View Answer
Ans : D

Explanation: hr tag is an example of the empty element, where you do not need opening
and closing tags, as there is nothing to go in between them.

5. Which of the following HTML tag is used to create an unordered list?


A. ol
B. ul
C. sl
D. pl
View Answer
Ans : B

Explanation: ul tag is used to create the unordered list items in an HTML document. By
default, unordered list items will display in a bulleted format.

6. Which of the following HTML tag is used to add a row in a table?


A. th
B. td
C. ts
D. tr
View Answer
Ans : D

Explanation: In HTML, tr tag is used to create a row in the table. tag is used to set the
header cell of a table.
7. Metadata does not define _________
A. character set
B. links
C. scripts
D. color
View Answer
Ans : D

Explanation: Metadata define character set, title of the document, links, styles, scripts and
other meta information.

8. Which element defines preformatted text?


A. p
B. pre
C. hr
D. ins
View Answer
Ans : A

Explanation: p defines paragraph/text.

9. Relative URLs are used to ____________


A. link other pages within the same site
B. link the same page with other sites
C. link other pages with other sites
D. does not link
View Answer
Ans : A

Explanation: Relative URLs are used for linking other pages within the same site. These are
the shorthand version of absolute URLs. It does not need a domain name. These URLs are
helpful when building a site on a computer because we can create links between pages
without having set up for hosting or domain name.

10. HTML also has six levels of headings.


A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A

Explanation: True, HTML also has six levels of headings.

1. Choose the correct option.


A. HTML form elements are used for taking user input.
B. HTML form elements are defined inside <for> tag.
C. HTML form elements can be of different types.
D. All of these.
View Answer
Ans : D

Explanation: All the above three statements hold true for forms in HTML.

2. Which one of the following is a form element?


A. text box.
B. radio button.
C. submit button.
D. All of these.
View Answer
Ans : D

Explanation: All of these are the types of form element.

3. Which one of the following is incorrect?


A. <label> tag in HTML is used for creating a tag for form elements.
B. <label> can be used to increase the clickable area of buttons
C. id attribute is used with <label> to increase the clickable area of form
elements
D. None of the above
View Answer
Ans : C
Explanation: attribute for is used with <label> for increasing the clickable area of form
elements.

4. Choose the incorrect option.


A. radio button allows to choose only one option from the given options.
B. default option can be chosen using attribute "selected" in radio button
C. default option can be chosen using attribute "checked" in radio button
D. checkbox allows to choose one or more than one options from the given
options.
View Answer
Ans : B

Explanation: "selected" is used to set an option as default in the radio button.

5. Choose the incorrect option.


A. action attribute is used inside starting tag of form.
B. With the use of action, we can redirect to a page once submit button is
clicked.
C. <form action:"home.php"> redirects to the page home.php
D. None of the above
View Answer
Ans : C

Explanation: Correct way of using action attribute is <form action="home.php">

6. Choose the correct option.


A. Use of method attribute determines by which method the datas in the form
will be submitted.
B. Method can be POST or GET.
C. Default method in HTML is GET.
D. All of the above
View Answer
Ans : D

Explanation: All three options are true with reference to the GET method in HTML.
7. Which one of the following does not hold true regarding GET method
in HTML?
A. Use of GET method in HTML is more secured.
B. Use of GET method enables us to bookmark the page.
C. GET has size limitation.
D. None of the above
View Answer
Ans : A

Explanation: The use of the GET method is not secured as data sent will be visible in the
URL.

8. Which one of the following does not hold true regarding POST method
in HTML?
A. Use of POST method in HTML is more secured.
B. Use of POST method enables us to bookmark the page.
C. POST has no size limitation.
D. None of these.
View Answer
Ans : B

Explanation: The use of POST method for form submission does not allow to bookmark the
page.

9. Which of the following tag is used for drop down list?


A. <select>
B. <text>
C. <textarea>
D. <dropdown>
View Answer
Ans : A

Explanation: <select> is used for dropdown list.

10. How more than one option can be selected in drop down?
A. Use of multiple attribute inside <option> tag.
B. Use of multiple attribute inside <select> tag.
C. use of multiple attribute inside <text> tag.
D. It is not possible to select more than one option in drop down.
View Answer
Ans : B

Explanation: By the use of multiple attributes inside opening tag of <select>, more than one
option can be selected in dropdown.

1. How many HTML heading tags are there?


A. 3
B. 4
C. 5
D. 6
View Answer
Ans : D

Explanation: There are total six tags in HTML, which are used for defining headings

2. In HTML, which one of the following is not a heading tag?


A. <h1>
B. <h0>
C. <h6>
D. <h3>
View Answer
Ans : B

Explanation: In HTML, heading tags can be from <h1> to <h6>.

3. Which one of the following tag will be used to add a heading to a


content?
A. <hr>
B. <p>
C. <br>
D. <h1>
View Answer
Ans : D

Explanation: <h1> is a heading tag which is used for adding a heading to a content

4. In order to display the contents as follows:


Headings- HTML
Sub-heading- Elements
Sub-sub-headings- Heading tags
Which one of the following options will be most preferred as tags for
each of the above line respectively?
A. <h1>,<h2>,<h3>
B. <h3>,<h2>,<h1>
C. <h6>,<h5>,<h4>
D. <h5>,<h3>,<h1>
View Answer
Ans : A

Explanation: In HTML, the content between the heading tags <h1> and </h1> has the
biggest size and it keeps on decreasing as we move towards <h6>.

5. Choose the correct option.


A. In HTML, <p> is an inline element while <h1> is a block element.
B. In HTML, <h1> is an inline element while <p> is a block element.
C. In HTML, both <p> and <h1> are inline elements.
D. In HTML, both <p> and <h1> are block elements.
View Answer
Ans : D

Explanation: Both <p> and <h1> are block elements. None of them are inline.

6. Which one of the following is used for adding paragraph in HTML?


A. <pre>
B. <p>
C. <para>
D. <pg>
View Answer
Ans : B

Explanation: <p> is the paragraph tag in HTML.

7. How the content of the following will be displayed when executed in


browser?

<!DOCTYPE html>

<html>

<body>

<p>LetsFindCourse</p>

<p>Learning Made Easy!</p>

</body>

</html>

A. LetsFindCourseLearning Made Easy!


B. LetsFindCourse Learning Made Easy!
C. LetsFindCourse
Learning Made Easy!
D. <p>LetsFindCourse</p>
<p>Learning Made Easy!</p>
View Answer
Ans : C

Explanation: The browser displays the content without tags and since <p> is a block
element, so it is displayed in the next line.

8. Fill in the blank from the given options in order to display the
paragraph in red colour font.

<!DOCTYPE html>

<html>

<body>
<p style="__________">LetsFindCourse</p>

</body>

</html>

A. color:red;
B. color=red;
C. text-color:red;
D. text-color=red;
View Answer
Ans : A

Explanation: Attribute color is used to change the color of the text.

9. With respect to the HTML code given below, which line will have the
highest font size?

<!DOCTYPE html>

<html>

<body>

<h1 style="font-size:15px;">Heading 1</h1>

<h3 style="font-size:30px;">Heading 3</h3>

<h5 style="font-size:20px;">Heading 5</h5>

</body>

</html>

A. Heading 1
B. Heading 3
C. Heading 5
D. All of the above
View Answer
Ans : B

Explanation: The browser will modify the size of the fonts of headings as per the size given
in the attribute font-size.
10. On execution of below HTML code, size of World will be equal to size
of which HTML tag?

<!DOCTYPE html>

<html>

<body>

<h4><h2><h3><h1>World</h1></h3></h2></h4>

</body>

</html>

A. h1
B. h2
C. h3
D. h4
View Answer
Ans : A

Explanation: Property of the text World will be determined by the innermost tag i.e. <h1>

1. Which one of the following tag is used for creating a hyperlink?


A. <link>
B. <hyperlink>
C. <a>
D. <title>
View Answer
Ans : C

Explanation: <a> is used for creating a hyperlink in HTML.

2. Which attribute is used to give destination address in <a> tag of


HTML?
A. href
B. type
C. address
D. link
View Answer
Ans : A

Explanation: href is used for defining destination address in <a> tag as <a href="destination
address">

3. Choose the correct option.


A. destination address is specified as value of href between and tag.
B. address specified as value of href in HTML have to be absolute.
C. address specified as value of href in HTML have to be relative.
D. address specified as value of href in HTML can be absolute or relative.
View Answer
Ans : D

Explanation: The address is specified as the value of href inside <a> tag of HTML and it can
be either absolute or relative.

4. Which one of the following value of target attribute opens the linked
url in a new tab?
A. _self
B. _blank
C. _top
D. _parent
View Answer
Ans : B

Explanation: <a href="link url" target="_blank"> opens the link url in a new tab.

5. What will the browser display for the above HTML code?

<a href="home.php">Go to Home Page</a>

A. It will display the entire line as it is.


B. It will display- Go to Home Page
C. It will display- Go to Home Page(link)
D. First it will display home.php, and upon clicking it, it will display Go to Home
Page.(link)
View Answer
Ans : C

Explanation: It creates a link as Go to Home Page, upon clicking of which if redirects to


home.php page.

6. What is the default value of target in <a> tag of HTML?


A. _self
B. _blank
C. _top
D. _parent
View Answer
Ans : A

Explanation: The default value of the target is _self i.e. by default the linked URL will open
in the same tab.

7. By default, an unvisited link in HTML is-


A. purple and underlined.
B. blue and underlined.
C. red and underlined.
D. blue and italics.
View Answer
Ans : B

Explanation: Link in HTML can be visited, unvisited or active. An unvisited link in HTML is
by default blue and underlined.

8. By default, the link in HTML is red and underlined when the link is-
A. visited
B. unvisited
C. Active
D. It is red and underlined.
View Answer
Ans : C

Explanation: The active link becomes red and underlined in HTML.

9. By default, a visited link in HTML is-


A. purple and underlined.
B. blue and underlined.
C. red and underlined.
D. blue and italics.
View Answer
Ans : A

Explanation: Link in HTML can be visited, unvisited or active. A visited link in HTML is by
default purple and underlined.

10. Default style of link can be changed by-


A. javascript
B. css
C. php
D. Cannot be changed at all.
View Answer
Ans : B

Explanation: Using CSS, we can change the default styling of links.

1. Which one of the following is a type of lists that HTML supports?


A. Ordered lists.
B. Unordered lists.
C. Description lists.
D. All of the above
View Answer
Ans : D

Explanation: All the three are types of lists in HTML.


2. By which tag, an unordered list is represented?
A. <u>
B. <I>
C. <ul>
D. <ol>
View Answer
Ans : C

Explanation: <ul> tag is for unordered list. <u> is for underline.

3. By which tag, an ordered list is represented?


A. <u>
B. <I>
C. <ul>
D. <ol>
View Answer
Ans : D

Explanation: <ol> tag is for an ordered list.

4. Below there is a HTML code.


Fill in the blanks in the above HTML code with a suitable option so as to
get the list as follows when executed in a browser.

<!DOCTYPE html>

<html>

<body>

<ul _____________>

<li>

Physics

</li>

<li>

Chemistry
</li>

<li>

Mathematics

</li>

</ul>

</body>

</html>

A. style="list-style-type:square;"
B. style="list-type:square;"
C. style="type:square;"
D. style= "style:square;"
View Answer
Ans : A

Explanation: In order to determine the type of item marker in an unordered list of HTML, list-
style-type is used.

5. .Fill in the blanks with a suitable option in order to number items of an


ordered list with small roman numbers.

<!DOCTYPE html>

<html>

<body>

<ol _________>

<li>

Physics

</li>

<li>

Chemistry

</li>
<li>

Mathematics

</li>

</ol>

</body>

</html>

A. style= "type:i"
B. style= "list-style-type:i"
C. type= "i"
D. type= "small roman"
View Answer
Ans : C

Explanation: In the ordered list of HTML, type= "i" is used to number the ordered list with
small roman numbers.

6. In order to start a list from 10, what attribute should be added in the
opening tag of ordered list?
A. begin= "10"
B. start= "10"
C. style= "begin:10"
D. style= "start:10"
View Answer
Ans : B

Explanation: <ol start=10> will start numbering the items in the list from 10.

7. A HTML code is given below


Fill in the blanks with appropriate option to get the output as below:

<!DOCTYPE html>

<html>

<body>
<dl>

____

Mathematics

____

____Calculus____

</dl>

</body>

</html>

A. <dd>,</dd>,<dt>,</dt>
B. <dt>,</dt>,<dd>,</dd>
C. <li>,</li>,<dd>,</dd>
D. <dt>,</dt>,<li>,</li>
View Answer
Ans : B

Explanation: This option will give the required output. Here <dt> is the description term and
is used to describe the description term.

8. In order to get a list without any item marker, which one of the
following can be used?

<!DOCTYPE html>

<html>

<body>

<dl>

____

Mathematics

____

____Calculus____

</dl>
</body>

</html>

A. <ul style= "list-style-type:none;">


B. <ul list-style-type= "none">
C. <ol list-style-type= "none">
D. <ul>
View Answer
Ans : A

Explanation: This option will remove the item marker and will simply display the elements of
the list without them.

9. What is the default start of item marker in ordered list?


A. 1
B. i
C. I
D. None of the above
View Answer
Ans : A

Explanation: If the ordered list is written without any attribute, e.g <ol> , the list will start
from 1 by default.

10. What is the default item marker in unordered lists of HTML?


A. Circle
B. Marker
C. disc
D. None of the above
View Answer
Ans : C

Explanation: By default, the unordered list has disc as its item marker.

1. Which HTML tag is used to define a table?


A. <tb>
B. <tl>
C. <table>
D. <tab>
View Answer
Ans : C

Explanation: Contents written between <table> and <table> are organised in the form of
table with the help of <tr>,<th> or <td> tags.

2. With the help of which tag, is a row defined in HTML?


A. <row>
B. <table-row>
C. <tablerow>
D. <tr>
View Answer
Ans : D

Explanation: Row in a table is defined using <tr>. The content written between <tr> and
</tr> is considered to be in single row.

3. Choose the correct option.


A. <th> is used for defining the heading of a table.
B. By default, contents written between <th> and </th> are bold and centered.
C. Both A and B
D. None of the above
View Answer
Ans : C

Explanation: <th> is used for table header and it is by default bold and centered.

4. By using which of the following options, the border of table can be


collapsed?
A. border-collapse:collapse
B. table-border:collapse
C. border:collapse
D. table-border-collapse:collapse
View Answer
Ans : A

Explanation: In order to collapse the border of a table, border-collapse: collapse; can be


used inside <style> tag.

5. Fill in the blanks with the help of options given below in order to get
the following table when the below code is executed.

<!DOCTYPE html>

<html>

<body>

<table border="2">

<tr>

<th>Name</th>

<th>Phone no</th>

</tr>

<tr>

<td ______________>John</td>

<td>9898989898</td>

</tr>

<tr>

<td>9876543210</td>

</tr>

</body>

</html>

Name Phone no

John 9898989898
9876543210

A. colspan= "1"
B. colspan= "2"
C. rowspan= "1"
D. rowspan= "2"
View Answer
Ans : D

Explanation: rowspan is used to merge two or more rows into one. Since here rowspan=2,
so it will merge two rows into one.

6. In order to add space of 20px between cell content and its border of a
table in html, which one of the following option is appropriate?
A. th,td{ padding: 20px;}
B. table{ margin:20px; }
C. table{ border : 20px;}
D. table{ padding: 20px; }
View Answer
Ans : A

Explanation: In order to add space between contents and its border, we use padding.

7. Which one of the following tags is used to add caption to a table?


A. <table-caption>
B. <tcaption>
C. <caption>
D. <tc>
View Answer
Ans : C

Explanation: <caption> adds caption to a table.

8. Which one of the following can be used to define the spacing between
the cells of a table?
A. border-spacing
B. spacing
C. cell-spacing
D. table-spacing
View Answer
Ans : A

Explanation: By setting the value of border-spacing, we can adjust the spacing between the
cells of a table.

9. By default, the content written between and are placed at center. How
can it be put at left side of the cell of the table?
A. th{ align: left; }
B. th{ text-align: left; }
C. th { font-align:center; }
D. It cannot be done.
View Answer
Ans : B

Explanation: text-align is used to set the alignment of the text.

10. Fill in the blanks with the help of options given below in order to get
the following table when the below code is executed.

<!DOCTYPE html>

<html>

<body>

<table border="2">

<tr>

<th>Name</th>

<th ____________>Phone no</th>

</tr>

<tr>

<td>John</td>
<td>9898989898</td>

<td>9876543210</td>

</tr>

</body>

</html>

Name Phone no

John 9898989898 9876543210

A. colspan= "1"
B. colspan= "2"
C. rowspan= "2"
D. rowspan= "2"
View Answer
Ans : B

Explanation: colspan is used to merge two or more columns into one. Since, here
colspan=2, so it will merge two columns into one.

1. The _________ tag defines metadata about an HTML document.


A. metadata
B. meta
C. data
D. head
View Answer
Ans : B

Explanation: The meta tag defines metadata about an HTML document. Metadata is data
(information) about data.
2. meta tags always go inside the ________ element.
A. div
B. title
C. head
D. img
View Answer
Ans : C

Explanation: meta tags always go inside the head element, and are typically used to specify
character set, page description, keywords, author of the document, and viewport settings.

3. Does will be displayed on the page.


A. Yes
B. No
C. Can be yes or no
D. Can not say
View Answer
Ans : B

Explanation: Metadata will not be displayed on the page, but is machine parsable.

4. Which attribute specifies the value associated with the http-equiv or


name attribute?
A. charset
B. name
C. http-equiv
D. content
View Answer
Ans : D

Explanation: Content : Specifies the value associated with the http-equiv or name attribute

5. charset is used for?


A. Specifies the character encoding for the HTML document
B. Provides an HTTP header for the information/value of the content attribute
C. Specifies a name for the metadata
D. None of the above
View Answer
Ans : A

Explanation: charset specifies the character encoding for the HTML document

6. Which of the following is not a function of robots meta tag?


A. noindex
B. nofollow
C. norepeat
D. noarchive
View Answer
Ans : C

Explanation: Valid values for the “CONTENT” attribute are: “INDEX”, “NOINDEX”,
“FOLLOW”, “NOFOLLOW”, “NOARCHIVE”. “NOREPEAT” is not any of robots meta tag.

7. What is the role of charset attribute? It specifies


A. a scheme to be used to interpret the value of the content attribute
B. a name for the metadata
C. the character encoding for the HTML document
D. the character decoding for the HTML document
View Answer
Ans : C

Explanation: A charset attribute is new in HTML5. The charset is used to provide the
character support. The charset attribute specifies the character encoding which is in an
external script file.

8. __________ prevents the page from being indexed altogether.


A. noarchive
B. nofollow
C. noindex
D. novalue
View Answer
Ans : C
Explanation: NOFOLLOW attribute instruct search engines that a hyperlink should not
influence the link target’s ranking in search engine. NOINDEX prevents page from being
indexed. To prevent a page from being cracked, NOARCHIEVE tag can be used. The
noindex value of an HTML robots meta tag requests that automated Internet bots avoid
indexing a web page.

9. Metadata is used by browsers, search engines, and other web services.


A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A

Explanation: Metadata is used by browsers (how to display content or reload page), search
engines (keywords), and other web services.

10. meta support which global attributes?


A. accesskey
B. class
C. hidden
D. All of the above
View Answer
Ans : D

Explanation: The tag also supports all the Global Attributes in HTML

1. ___________ is a standardized way to provide additional semantics in


your web pages.
A. metadata
B. microdata
C. minidata
D. webdata
View Answer
Ans : B
Explanation: Microdata is a standardized way to provide additional semantics in your web
pages.

2. Does microdata consists of a group of name-value pairs.


A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A

Explanation: True, microdata consists of a group of name-value pairs.

3. Microdata introduces ______ global attributes.


A. 3
B. 4
C. 5
D. 6
View Answer
Ans : C

Explanation: Microdata introduces five global attributes which would be available for any
element to use and give context for machines about your data.

4. Which attribute is used to create an item?


A. itemtype
B. itemid
C. itemprop
D. itemscope
View Answer
Ans : D

Explanation: itemscope : This is used to create an item. The itemscope attribute is a


Boolean attribute that tells that there is Microdata on this page, and this is where it starts.
5. Which attribute is global identifier for the item?
A. itemtype
B. itemid
C. itemprop
D. itemscope
View Answer
Ans : B

Explanation: itemid : This attribute is global identifier for the item.

6. Each name-value pair is a ?


A. items
B. class
C. property
D. object
View Answer
Ans : C

Explanation: The groups are called items, and each name-value pair is a property.

7. Which of the following is true if the property value of a name-value


pair added by an element with an itemprop attribute is a meta element?
A. The value is the item created by the element
B. The value is the value of the element’s value attribute, if it has one, or the
empty string otherwise
C. On getting, if the element has a datetime content attribute, the IDL attribute
must return that content attribute’s value
D. The value is the element’s textContent
View Answer
Ans : B

Explanation: When the property value of a name-value pair added by an element with an
itemprop attribute which is a meta element then the value is the value of the element’s value
attribute, if it has one, or the empty string otherwise. The “itemprop” attribute is a global
attribute which adds properties to item.
8. The ___________ of an item is the value of its element’s itemid attribute.
A. token
B. typed item
C. global identifier
D. scope
View Answer
Ans : C

Explanation: The global identifier of an item is the value of its element’s itemid attribute, if it
has one, resolved relative to the element on which the attribute is specified. If the itemid
attribute is missing or if resolving it fails, it is said to have no global identifier. The “typed
item” creates new item.

9. Which of the following is true if the property value of a name-value


pair added by an element with an itemprop attribute is a data element?
A. The value is the value of the element’s value attribute if it has one, or the
empty string otherwise
B. The value is the item created by the element
C. The value is the element’s datetime value
D. The value is item’s scope
View Answer
Ans : A

Explanation: The “itemprop” attribute is a global attribute which adds properties to item.
When the property value of a name-value pair added by an element with an itemprop
attribute which is a data element then the value is the value of the element’s value attribute
if it has one, or the empty string otherwise.

10. To add a property to an item, the itemprop attribute is used on one of


the item's descendants.
A. Yes
B. No
C. Can be yes or no
D. Can not say
View Answer
Ans : A

Explanation: Yes, To add a property to an item, the itemprop attribute is used on one of the
item's descendants.
1. _________ is an application software that allows us to view and explore
information on the web.
A. HTML
B. web Browser
C. IDEs
D. Libraries
View Answer
Ans : B

Explanation: web Browser is an application software that allows us to view and explore
information on the web.

2. User can request for any web page by just entering a _________ into
address bar.
A. text
B. keyword
C. URL
D. All of the above
View Answer
Ans : C

Explanation: User can request for any web page by just entering a URL into address bar.

3. Web browser can show ________.


A. text
B. audio
C. video
D. All of the above
View Answer
Ans : D

Explanation: Web browser can show text, audio, video, animation and more.

4. Vendor of Mozilla Firefox is?


A. Microsoft
B. Google
C. Mozilla
D. Netscape Communications Corp
View Answer
Ans : C

Explanation: Mozilla Firefox vendor is Mozilla

5. Controller works as a control unit in CPU.


A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A

Explanation: True, Controller works as a control unit in CPU.

6. A Rendering engine is not responsible for ________


A. parsing the markup content (HTML)
B. parsing style information (CSS, XSL, and so on)
C. generating a visual presentation of the formatted content including media
files referenced
D. parsing style information (CSS only)
View Answer
Ans : D

Explanation: A rendering engine is a software that draws text and images on the screen.
The engine draws structured text from a document (HTML, XML) and formats it properly
based on the given style declarations (CSS, XSL, etc). The primary job of a browser engine
is to transform HTML documents and other resources of a web page into an interactive
visual representation on a user’s device.

7. What is the use of “defer” attribute?


A. It defers rendering of html page
B. It defers script execution until the page has been rendered
C. It defers rendering of css attributes
D. It is only for internal scripts
View Answer
Ans : B

Explanation: The defer attribute is a boolean attribute. The script is executed after the page
has finished parsing. The defer attribute is used if and only if there is src attribute. Defer is
for external not internal scripts.

8. Which of the following statements is false?


A. async and defer attributes of script tag execute before the
DOMContentLoaded event
B. defer executes each script sequentially
C. async executes each script when it is ready
D. all older browsers supports async attribute
View Answer
Ans : D

Explanation: In async attribute, the script is executed asynchronously with the rest of the
page (the script will be executed while the page continues the parsing). Defer, the Boolean
attribute is set to indicate to a browser that the script is meant to be executed after the
document has been parsed, but before firing DOMContentLoaded event. Older browsers
doesn’t support async attribute.

9. Browser of Apple is?


A. Chrome
B. Firefox
C. Opera
D. Safari
View Answer
Ans : D

Explanation: Safari is browser of Apple

10. Interpreter receives the information from the controller and execute
the instruction line by line.
A. Yes
B. No
C. Can be yes or no
D. Can not say
View Answer
Ans : A

Explanation: Yes, Interpreter receives the information from the controller and execute the
instruction line by line.

1. ___________ refers to the speed in which web pages are downloaded and
displayed on the user's web browser.
A. Web databases
B. Web performance
C. Web storage
D. Web data
View Answer
Ans : B

Explanation: Web performance refers to the speed in which web pages are downloaded and
displayed on the user's web browser.

2. website optimization is the field of knowledge about increasing web


performance
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A

Explanation: True, website optimization is the field of knowledge about increasing web
performance

3. Web performance optimization improves?


A. frontend
B. backend
C. database
D. ux
View Answer
Ans : D

Explanation: Web performance optimization improves user experience (UX) when visiting a
website and therefore is highly desired by web designers and web developers.

4. Steve Souders coined the term "web performance optimization" in


________.
A. 2002
B. 2003
C. 2004
D. 2005
View Answer
Ans : C

Explanation: Steve Souders coined the term "web performance optimization" in 2004

5. Major portion of web page contributes _________________


A. image
B. text
C. video
D. audio
View Answer
Ans : A

Explanation: 64% of any website’s page is made up of images. The loading speed of the
websites also slows down due to this much contribution of images in a web page. To reduce
this loading time we use web performance optimization.

6. What is the maximum cache size for Chrome?


A. unlimited
B. 300 MB
C. 400 MB
D. 1024 MB
View Answer
Ans : B
Explanation: Maximum Cache size for Chrome is 300 MB, for Safari it is unlimited, For
Opera 10+ it is 400 MB, for Firefox 17 the maximum cache size is 1024 MB, for Internet
Explorer 6,7,8 it is 50 MB and for Internet Explorer maximum cache size is 250 MB.

7. HTTP request is between _______________


A. client and host
B. client and server
C. server and host
D. user and server
View Answer
Ans : A

Explanation: HTTP stands for Hypertext Transfer Protocol. For fetching, data from server
browser uses HTTP request, and in between client and host. The more HTTP request
slower the loading of a page will be.

8. Gzip is not fully supported by ___________


A. Netscape 4.60+
B. Firefox
C. Netscape 6+
D. IE 4+
View Answer
Ans : A

Explanation: Gzip or deflate is partially supported by Netscape 4.60+. Netscape 6+, IE 4+,
Opera 5+, Safari, Chrome, Lynx 2.6+ and Firefox fully support Gzip compression, IE 4.5
and 5 does not support Gzip compression, IE 5.5 and 6.0, IE 6.0 SPI, IE 6,7,8 partially
support Gzip compression.

9. Does web caching optimization reduces server load, bandwidth usage


and latency?
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: True, Web Caching Optimization reduces server load, bandwidth usage and
latency.

10. Web caches are located on __________ of a CDN.


A. client side
B. web-server side
C. Both A and B
D. None of the above
View Answer
Ans : C

Explanation: Web caches are located on either the client side (forward position) or web-
server side (reverse position) of a CDN.

1. ___________ refers to the speed in which web pages are downloaded and
displayed on the user's web browser.
A. Web databases
B. Web performance
C. Web storage
D. Web data
View Answer
Ans : B

Explanation: Web performance refers to the speed in which web pages are downloaded and
displayed on the user's web browser.

2. website optimization is the field of knowledge about increasing web


performance
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A

Explanation: True, website optimization is the field of knowledge about increasing web
performance

3. Web performance optimization improves?


A. frontend
B. backend
C. database
D. ux
View Answer
Ans : D

Explanation: Web performance optimization improves user experience (UX) when visiting a
website and therefore is highly desired by web designers and web developers.

4. Steve Souders coined the term "web performance optimization" in


________.
A. 2002
B. 2003
C. 2004
D. 2005
View Answer
Ans : C

Explanation: Steve Souders coined the term "web performance optimization" in 2004

5. Major portion of web page contributes _________________


A. image
B. text
C. video
D. audio
View Answer
Ans : A

Explanation: 64% of any website’s page is made up of images. The loading speed of the
websites also slows down due to this much contribution of images in a web page. To reduce
this loading time we use web performance optimization.
6. What is the maximum cache size for Chrome?
A. unlimited
B. 300 MB
C. 400 MB
D. 1024 MB
View Answer
Ans : B

Explanation: Maximum Cache size for Chrome is 300 MB, for Safari it is unlimited, For
Opera 10+ it is 400 MB, for Firefox 17 the maximum cache size is 1024 MB, for Internet
Explorer 6,7,8 it is 50 MB and for Internet Explorer maximum cache size is 250 MB.

7. HTTP request is between _______________


A. client and host
B. client and server
C. server and host
D. user and server
View Answer
Ans : A

Explanation: HTTP stands for Hypertext Transfer Protocol. For fetching, data from server
browser uses HTTP request, and in between client and host. The more HTTP request
slower the loading of a page will be.

8. Gzip is not fully supported by ___________


A. Netscape 4.60+
B. Firefox
C. Netscape 6+
D. IE 4+
View Answer
Ans : A

Explanation: Gzip or deflate is partially supported by Netscape 4.60+. Netscape 6+, IE 4+,
Opera 5+, Safari, Chrome, Lynx 2.6+ and Firefox fully support Gzip compression, IE 4.5
and 5 does not support Gzip compression, IE 5.5 and 6.0, IE 6.0 SPI, IE 6,7,8 partially
support Gzip compression.
9. Does web caching optimization reduces server load, bandwidth usage
and latency?
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A

Explanation: True, Web Caching Optimization reduces server load, bandwidth usage and
latency.

10. Web caches are located on __________ of a CDN.


A. client side
B. web-server side
C. Both A and B
D. None of the above
View Answer
Ans : C

Explanation: Web caches are located on either the client side (forward position) or web-
server side (reverse position) of a CDN.

1. How the HEX value of color represented in HTML?


A. #rrggbb
B. #rrbbgg
C. #ggrrbb
D. #bbrrgg
View Answer
Ans : A

Explanation: #rrggbb is the correct way of representing a color in HTML.


2. Choose the correct option.
A. In HTML, rr,gg,bb of #rrggbb represents red, green and black color in hex
values.
B. In HTML, rr,gg,bb of #rrggbb represents red, grey and black color in hex
values.
C. In HTML, rr,gg,bb of #rrggbb represents red, grey and blue color in hex
values.
D. In HTML, rr,gg,bb of #rrggbb represents red, green and blue color in hex
values.
View Answer
Ans : D

Explanation: In #rrggbb, each three represents the intensity of red, green and blue colors
respectively.

3. Fill in the blanks from one of the options given below so that the
background of the paragraph is filled with color of color code #3cb371.

<!DOCTYPE html>

<html>

<body>

<p style="__________">A paragraph</p>

</body>

</html>

A. background-color:hex(#3cb371);
B. bg-color:hex(#3cb371);
C. background-color:#3cb371;
D. bg-color:#3cb371;
View Answer
Ans : C

Explanation: #3cb371 already reprsents that the color code is in HEX value. Writing hex
before the code is wrong.
4. #ffffff is equivqlent to which color in rgb color representation?
A. rgb(0,0,0)
B. rgb(100,100,100)
C. rgb(90,90,90)
D. rgb(255,255,255)
View Answer
Ans : D

Explanation: Both #ffffff and rgb(255,255,255) represents white color.

5. Which color is #ff0000?


A. White
B. Black
C. Red
D. Blue
View Answer
Ans : C

Explanation: Since, the only rr is having #ff value and rest two are having 00, so the color
will be red.

6. In HTML, black color can be represented as-


A. #000000
B. #aaaaaa
C. #bbbbbb
D. #ffffff
View Answer
Ans : A

Explanation: When all the three rr,gg,bb of #rrggbb have 00 value, it gives black color.

7. What is the total number of colors that can be represented using HEX
system in HTML?
A. 16^3
B. 16^6
C. 2^6
D. 2^16
View Answer
Ans : B

Explanation: Each digit of #rrggbb can have 16 values (from 0 to F) and there are total of 6
digits. Hence, the total number of possible colors=166.

8. Choose the correct option.


A. In HEX color representation of HTML, #0f0 and #00ff00 represents same
color.
B. In HEX color representation of HTML, color cannot be represented as #0f0.
C. In HEX color representation of HTML, color can be represented as #0f0 but
it is not the same as #00ff00.
D. None of the above
View Answer
Ans : A

Explanation: In HTML, #00ff00 can be abbreviated as #0f0.

9. Which of the following color codes of HTML represent the same color?
(i) #00ff00
(ii) hsl(120,100%,50%)
(iii) rgb(255,99,71)
A. All three.
B. i and ii
C. i and iii
D. ii and ii
View Answer
Ans : B

Explanation: i and ii represents color green while iii represents color tomato.

10. Which of the following is equivqlent to rgb(255,99,71)?


A. #ff9971
B. #ffaa71
C. #ff6347
D. #ffa6c8
View Answer
Ans : C

Explanation: Converting 255,99 and 71 into hexadecimal, we get ff,63 and 47 respectively.
Hence the equivalent color code will be #ff6347.

1. The value of h parameter in hsl ranges from


A. 0^o to 90^o
B. 0^o to 180^o
C. 0^o to 240^o
D. 0^o to 360^o
View Answer
Ans : D

Explanation: h parameter in HSL represents the color in degrees which ranges from 0
degrees to 360 degrees.

2. What is the value of h in hsl for red color?


A. 0degree
B. 120degree
C. 180degree
D. 270degree
View Answer
Ans : A

Explanation: For the red color, the hue has a value of 00 value.

3. What is the value of h in hsl for green color?


A. 0degree
B. 120degree
C. 240degree
D. 270degree
View Answer
Ans : B

Explanation: For green color, the hue has a value of 120degree value.

4. What is the value of h in hsl for blue color?


A. 0degree
B. 120degree
C. 240degree
D. 270degree
View Answer
Ans : C

Explanation: For blue color, the hue has a value of 240degree value.

5. Which of the following is correct regarding s parameter in hsl in


HTML?
A. s stands for saturation.
B. s determines the intensity of the color
C. None of a and b is correct.
D. Both a and b are correct.
View Answer
Ans : D

Explanation: In hsl, s i.e. value of saturation is used for determining the intensity of the
color.

6. What color does 100% saturation give?


A. pure color.
B. white
C. shades of grey.
D. None of the above
View Answer
Ans : A

Explanation: 100% saturation always gives pure color.


7. What color does 0% saturation give?
A. pure color.
B. white
C. shades of grey.
D. None of the above
View Answer
Ans : C

Explanation: 0% saturation gives the darkest shade of grey and their original color will not
be seen.

8. Which one of the following is not correct regarding l parameter of hsl


in HTML?
A. value of l is used determining the lightness of the color
B. 0% means completely dark and 100% means completely light.
C. for getting original color, it should be set to 100%
D. None of the above
View Answer
Ans : C

Explanation: For getting the original color, it should be set to 50%.

9. What color will hsl(0,100%,50%) give?


A. red
B. green
C. blue
D. black
View Answer
Ans : A

Explanation: The 0degree hue value is red. Moreover, it is 100% saturated and lightness is
also 50%. So, it will give a red color.

10. Choose the incorrect option regarding 'a' parameter of hsla.


A. a stands for alpha.
B. It has so limit in its maximum value
C. It's minimum value is 0.
D. It determines the degree of transparency.
View Answer
Ans : B

Explanation: Its maximum value is 1.

1. In HTML, colors can be specified by-


A. RGB
B. RGBA
C. HEX
D. All of the above
View Answer
Ans : D

Explanation: All the three can be used for determining the color in HTML.

2. What does R,G and B in RGB value of HTML color mean?


A. Red,Green,Blue
B. Red,Grey,Black
C. Red,Grey,Blue
D. Red,Green,Black
View Answer
Ans : A

Explanation: RGB means the three basic colors Red, Blue, Green

3. Each of RGB has its value from-


A. 0 to 256
B. 0 to 254
C. 0 to 255
D. 1 to 256
View Answer
Ans : C
Explanation: Each color of RGB has its value ranging from 0 to 255. The more the value,
the darker is its intensity.

4. Which color do RGB(0,0,0) represent?


A. White
B. Black
C. Red
D. Blue
View Answer
Ans : B

Explanation: When all the three values are 0, it gives Black color.

5. Which color do RGB(255,255,255) represent?


A. White
B. Black
C. Red
D. Blue
View Answer
Ans : A

Explanation: When all the three values are 255, it gives White color.

6. Choose the correct option.


A. In rgba, a stands for alpha.
B. Its value ranges from 0 to 1.
C. Both a and b are correct.
D. None of the above
View Answer
Ans : C

Explanation: In rgba, a stands for alpha which measures the degree of transparency.

7. Which color will rgba(255,0,0,0) give?


A. red
B. black
C. tomato
D. white
View Answer
Ans : D

Explanation: Since, here a=0, so it will be completely transparent i.e. white.

8. Which color will rgb(0,255,0) give?


A. red
B. green
C. tomato
D. blue
View Answer
Ans : B

Explanation: Since all the other two values are 0, so it will give the green color.

9. Which one of the following colors will be darkest?


A. rgb(30,30,30)
B. rgb(90,90,90)
C. rgb(120,120,120)
D. rgb (200,200,200)
View Answer
Ans : A

Explanation: All the above four represent different shades of grey color. The one having the
lowest intensity will be the darkest.

10. Which one of the following colors will be darkest?


A. rgba(255,99,71,0)
B. rgba(255,99,71,0.5)
C. rgba(255,99,71,0.8)
D. rgba(255,99,71,0.2)
View Answer
Ans : C
Explanation: The higher the value of a parameter in rgba, the less transparent the color will
be. Hence rgba(255,99,71,0.8) will be the darkest among the four.

You might also like