HTML Mcqs

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

Provide answers for the following sample

1. What is a unique text-based Internet address corresponding to a computer's unique numeric


IP address called?

a. IP address

b. domain name

c. URL

d. user name

2. Choose the true statement:

a. The content that displays in the browser is contained in the head section.

b. The content that displays in the browser is contained in the body section.

c. Information about the web page is contained in the body section.

d. All of the above are true.

3. The purpose of …………….. is to ensure the integrity of the communication.

a. IP

b. TCP

c. HTIP

d. FTP

4. Which tag pair con figures a structural area on a web page?

a. <area> </area>

b. <div> </div>

c. <cite> </cite>
d. <strong> </strong>

5. Which tag pair is used to create the largest heading?

a. <hl> </hl>

b. <h9> </h9>

c. <h type=”largest”> </h>

d. <h6> </h6>

6. Which tag configures the following text or element to display on a new line?

a. <new line>

b. <nl>

c. <br>

d. <line>

7. Which tag pair configures a paragraph?

a. <para> </para>

b. <paragraph> </paragraph>

c. <p> </p>

d. <body> </body>

8. What is the default alignment for headings and paragraphs?

a. center

b. left
c. right

d. wherever you type them in the source code

9. Which type of HTML list will automatically number the items for you ?

a. numbered list

b. ordered list

c. unordered list

d. description list

10. Which tag configures a horizontal line on a web page?

a. <br>

b. <hl>

b. <hr>

a. <line>

11. Which tag pair contains the items in an ordered or unordered list?

a. <item> </item>

b. <li> </li>

c. <dd> </dd>

b. all of the above

12. Which statement is true?


a. The W3C Markup Validation Service describes how to fix the errors in your web page.

b. The W3C Markup Validation Service lists syntax errors in a web page.

c. The W3C Markup Validation Service is only available to W3C members.

d. None of the above statements are true

13. Which tag is used to hyperlink web pages to each other?

a. <link> tag

b. <a> tag

c. <hyperlink> tag

d. <body > ta g

14. When do you need to use a domain name in a hyperlink?

a. always

b. when linking to a web page fil e on the same site

c. when linking to a web page file on an external site

d. never

15. What does an e-mail link do?

a. automatically sends you an e-mail message with the visitor's e-mail address as the reply-to
field

b. launches the default e-mail application for the visitor's browser with your e-mail address as
the recipient

c. displays your e-mail address so that the visitor can send you a message later
d. links to your mail server

16. How would you configure a hyperlink from the index.html file to another file named
products.html that is located in the same folder?

a. <a target= "products.html">Products< /a>

b. <a href="products.html">Products< /a>

c. <a name = " products. html " >Products</ a>

d. <a>Products</a>

17. Which attribute ca n be applied to an anchor tag to open a link in a new browser window?

a. window

b. rel

c. target

d. media

18. Which of the following attributes defines a fragment identifier in a page?

a. id

b. fragment

c. identifier

d. bookmark

19. When should you code a relative hyperlink?

a. always; the W3C prefers relative hyperlinks

b. when linking to a web page that is external to your website


c. when linking to a web page that is internal to your website

d. never; the W3C has deprecated relative hyperlinks

20. Which attribute identifies the name and location of the file to access when a hyperlink is
clicked?

a. window

b. rel

c. href

d. media

21. Which of the following is not a web design recommended practice?

a. design your site to be easy to navigate

b. colorful pages appeal to everyone

c. design your pages to load quickly

b. limit the use of animated items

22. Which of the following is influenced by the intended or target audience of a site?

a. the amount of color used on the site

b. the font size and styles used on the site

c. the overall look and feel for the site

d. all of the above

23. Which of the following recommended design practices applies to a website that uses images
for its main site navigation?
a. provide alternative text for the images

b. place text links at the bottom of the page

c. both a and b

d. no special considerations are needed

24. Which of the following is known as white space?

a. the empty screen area around blocks of text and images

b. the background color of white used for a page

c. both a and b

d. none of the above

25. Which of the following should you do when creating text hyperlinks?

a. create the entire sentence as a hyperlink

b. include the words “click here" in your text

c. use a key phrase as a hyperlink

d. none of the above

26. Which of the following can be a CSS selector?

a. an HTML element name

b. a class name

c. an id name

d. all of the above


27. 2. Which of the following is the CSS property used to set the background color?

a. bgcolor

b. color

c. background- color

d. none of the above

28. Which type of CSS is coded in the body of the web page as an attribute of an HTML tag?

a. embedded

b. external

c. inline

d. imported

29. Which of the following associates a web page with an external style sheet?

a. <style rel="external” href="style.css">

b. <style src= "style.css">

c. <link rel= "stylesheet” href=”style.css">

d. <link rel= ”stylesheet” src="style.css”>

30. Which of the following configures a CSS class called news with red text (#FFOOOO) and
light gray background (#EAEAEA)?

a. news { color: #FFOOOO; background-color: #EAEAEA; }

b. .news { color: #FFOOOO; background-color: #EAEAEA; }


c. .news { text: #FFOOOO; background- color: #EAEAEA; }

d. #news { color: #FFOOOO; background- color: #EAEAEA; }

31. An External Style Sheet uses the __ file extension.

a. ess

b. htm

c. css

d. No file extension is necessary

32. Where do you place the code to associate a web page with an external style sheet?

a. in the external style sheet

b. in the DOCTYPE of the web page document

c. in the body section of the web page document

d. in the head section of the web page document

33. Which of the following configures a background color of #FFF8DC for a web page using
CSS?

a. body { background-color: #FFF8DC; }

b. document { background: #FFF8DC; }

b. body { bgcolor : #FFF8DC;}

a. none of the above

34. Which tag configures a block display area or division on a page?


a. <div>

b. <span>

b. <division>

a. <head>

35. Which property and value are used to configure an unordered list item with a square list
marker?

a. list-bullet: none;

b. list- style- type: square;

c. list-style-image: square;

d. list- marker: square;

36. Which of the following creates an image link to the index.html page when the home.gif
graphic is clicked?

a. <a href="index.html " src= "home .gif" alt="Home"></a>

b. <a href="index.html"><img src= "home.gif” alt="Home"></a>

c. <img src= "home.gif” href=”index.html” alt="Home">

d. <a src= "home. gif "> <img src="home.gif” alt="Home">< / a>

37. Why should you include height and width attributes on an <img> tag?

a. They are required attributes and must always be included.

b. They help the browser render the page faster because it reserves the appropriate space for
the image.

c. They help the browser display the image in its own window.
d. none of the above

38. Which attribute specifies text that is available to browsers and other user agents that do not
support graphics?

a. alt

b. src

c. text

d. none of the above

39. What is the term used to describe a square icon that is associated with a web page and is
displayed in the browser address bar or tab?

a. background

b. favicon

c. bookmark icon

d. logo

40. Which of the following graphic types is best suited to photographs?

a. GIF

b. photo

c. BMP

d. JPEG

41. Which of the following configures a graphic to repeat vertically down the side of a web
page?
a. background-repeat: repeat- x;

b. background-repeat: repeat;

c. valign= "left”

d. background- repeat: repeat - y;

42. Which CSS property configures the background image of an element?

a. background- color

b. favicon

c. bgcolor

d. background- image

43. Which CSS property will configure the font typeface?

a. font - face

b. font - family

c. face

d. size

44. Which CSS property will configure bold text?

a. font - face

b. font-weight

c. font-style

d. font-size

45. Which CSS property will configure italic text?


a. font - face

b. font-weight

c. font-style

d. font- size

46. Which configures a class called news with red text, large font, and AriaI or a sans-serif font
using CSS?

a. news {color: red; font-size: large; font-family: Arial, sans- serif;}

b. .news {color: red; font-size: large; font- family: Arial, sans- serif;}

c. .news {text: red; font - size: large; font-family: Arial, sans-serif;}

d. #news {text: red; font-size : large; font- family: Arial, sans-serif;}

47. Which of the following will configure padding that is 15 pixels on the top, 0 pixels on the
left and right, and 5 pixels on the bottom?

a. padding: 0px 5px 0px l5px;

b. padding: top- l5, left- 0, right-0, bottom- 5;

c. padding: l5px 0 5px 0;

d. padding: 0 0 l5px 5px;

48. Which of the following is used along with the width property to configure centered page
content?

a. margin - left: auto; margin-right : auto

b. margin: top- l5, left-0, right-0, bottom-5;

c. margin: l5px 0 5px 0;


d. margin: 20px;

49. Which CSS property will center text within an element?

a. center

b. align

c. text - align

d. text – center

50. Which of the following will config ure a border that is 5 pixels wide, the color #330000, and
a solid line?

a. border: 5px solid #330000;

b. border-style: solid 5px;

c. border: 5px, solid, #330000;

d. border: 5px line #330000;

51. Which of the following is an HTML5 element used to indicate tangential content?

a. header

b. nav

c. sidebar

d. aside

52. Which of the following pseudo-classes is the default state for a hyperlink that has already
been clicked?
a. :hover

b. :onclick

c. :link

d. :visited

53. Which of the following is used to change the location of an element slightly in relation to
where it would otherwise appear on the page?

a. relative positioning

b. the float property

c. absolute positioning

d. this cannot be done with CSS

54. Which of the following configures a class called nav to float to the left?

a. .nav { left: float; }

b. .nav { float: left; }

c. .nav { float - left: 200px; }

d. none of the above

55. Which HTML attribute specifies the distance between the edges of each cell ?

a. cellpad

b. cellspacing

c. cellpadding
d. cellborder

56. Which HTML attribute specifies the distance between the cell text and the cell border?

a. cellpad

b. cellpadding

c. cellspacing

d. cellborder

57. Which HTML tag pair is used to group rows in the footer of a tab le?

a. <footer> </footer>

b. <tr> </tr>

c. <tfoot> </tfoot>

d. none of the above

58. Which HTML element uses a border attribute to display a table with a border?

a. <td>

b. <table>

c. <tr>

d. <tableborder>

59. 5. Which HTML tag pair is used to specify table headings?

a. <td> </td>

b. <head> </head>
c. <th> </th>

d. <tr> </tr>

60. Which CSS property replaces the use of the cell padding attribute?

a. cell-padding

b. padding

c. border-spacing

d. none of the above

61. Which HTML tag pair is used to begin and end a table row?

a. <td> </td>

b. <tr> </tr>

c. <table> </table>

d. none of the above

62. Which of the following is the intended use of tables on web pages?

a. configuring the layout of an entire page

b. organizing information

c. forming hyperlinks

d. configuring a resume

63. Which CSS property specifies the background color of a table?

a. background

b. bgcolor
c. background- color

d. none of the above

64. Which HTML attribute associates a table data cell with a table header cell?

a. head

b. align

c. headers

d. rowspan

65. Which attribute of the <form> tag is used to specify the name and location of the script that
will process the form field values?

a. action

b. method

c. process

d. id

66. Forms contain various types of …………. such as text boxes and buttons, that accept
information from a web page visitor.

a. hidden elements

b. form controls

c. labels

d. legends
67. Choose the tag that would configure a text box with the name "city" and a width of 40
characters.

a. <input type="text" id="city” width="40">

b. <input type =”text" name="city” size="40">

c. <input type=”text” name="city” space="40">

d. <input type= “text” width="40">

68. Which of the following form controls would be appropriate for an area that your visitors can
use to type in their e-mail address?

a. select list

b. scrolling text box

c. text box

d. none of the above

69. You would like to conduct a survey and ask your web page visitors to vote for their favorite
search engine. Which of the following form controls is best to use for this purpose?

a. check box

b. text box

c. radio button

d. scrolling text box

70. What will happen when a browser encounters a new HTMLS form control that it does not
support?

a. The computer will shut down.


b. The browser will crash.

c. The browser will display an error message.

d. The browser will display an input text box.

71. Which tag would configure a scrolling text box with the name comments, two rows, and
thirty characters?

a. <textarea name= "comments' width="30" rows="2'></textarea>

b. <input type=" textarea” name= " comments" size="30" rows = "2">

c. <textarea name ="comments" rows= "2 " cols="30"></textarea>

d. <textarea name= ”comments” width=" 30” rows="2">

72. Choose the item that would associate a label displaying the text E-mail: with the text box
named email.

a. E-mail <input type= “textbox” name= “email" id=”email">

b. <label> E-mail: <input type= “text" name= “email " id="email"></label>

c. <label for= " email" >E - mail </label> <input type= "text" name="email" id =" email">

d. both b and c

73. Which property provides a way for you to rotate, scale, skew, or move an element?

a. display

b. transition

c. transform
d. list- style- type

74. In which of the following sections of a web page should meta tags be placed?

a. head

b. comment

c. body

d. none of the above

75. What is the purpose of private registration for a domain name?

a. It protects the privacy of your web host.

b. It is the cheapest form of domain name registration.

c. It protects the privacy of your contact information.

d. none of the above

You might also like