HTML Question Paper
1. The correct sequence of HTML tags for starting a webpage is -
A. Head, Title, HTML, body
B. HTML, Body, Title, Head
C. HTML, Head, Title, Body
D. Title, HTML, Head, Body
2. <legend> is used to assign a caption to set of form defined by a _____ element
A. fieldset
B. caption
C. fieldgroup
D. assign
3. <video controls="controls" preload="none"> <source src="song.mp4" type="video/mp4" /> </video>
Which of the following is true?
A. It should load the entire video when the page loads.
B. It should load only metadata when the page loads.
C. It should load the part of the video when the page loads.
D. It should not load the video when the page loads.
4. Among the following, which is the HTML paragraph tag?
A. <p>
B. <pre>
C. <hr>
D. <a>
5. Colors are defined in HTML using?
A. RGB Values
B. HEX Values
C. RGBA Values
D. All of the above
6. Elements to be centre aligned in browser display are enclosed inside ______ HTML tags
A. <p>....</p>
B. img src='bg.jpg'
C. <div align="Left"> .... </div>
D. <center> .... </center>
7. For displaying a list to create a menu horizontally, we can use ________________
A. <dd>
B. float: Left
C. type: Left
D. <left>
8. For displaying Two or more <div> horizontally, we can use
A. <style="float: Left;">
B. <left>
C. <style="horizontal">
D. <type: float>
9. How do we write comments in HTML?
A. </--Comment-->
B. <!--Comment-->
C. </--Comment--/>
D. <*Comment*>
10. How is black color represented in terms of RGB values?
A. RGB(0,0,0)
B. RGB(100,100,100)
C. RGB(100,100,0)
D. RGB(100,0,0)
11. How many sizes of headers are available in HTML by default?
A. 5
B. 1
C. 3
D. 6
12. How to create a checkbox in HTML Form?
A. <input type="text">
B. <input type="textarea">
C. <input type="checkbox">
D. <input type="button">
13. How to display preformatted text in HTML?
A. <p>
B. <pre>
C. <hr>
D. All of the above
14. How to insert Hyperlink in HTML Page?
A. <a href="https://www.sanfoundry.com/1000-html-questions-answers/">HTML MCQ</a>
B. <a target="https://www.sanfoundry.com/1000-html-questions-answers/">HTML Quiz />
C. <a src="https://www.sanfoundry.com/1000-html-questions-answers/">HTML Test</a>
D. <a>https://www.sanfoundry.com/1000-html-questions-answers/</a>
15. How to make an element draggable:
A. <div drag="true">
B. <div draggable="true">
C. <div type="drag">
D. <div type="draggable">
16. HTML headings are defined with the ______ tags.
A. <head1> to <head6>
B. <p1> to <p6>
C. <h1> to <h6>
D. <h1> to <h3>
17. HTML is the method where ordinary text can be converted into ______
A. ASCII Text
B. EBCDIC Text
C. HyperText
D. None of the above
18. HTML is the standard ______ language for creating Web pages.
A. scripting
B. programming
C. styling
D. markup
19. HTML tags with no content are called _________
A. Special Tags
B. Advanced Tags
C. Empty Tags
D. Other Tags
20. If a background image is smaller than the screen on which it is being displayed, what will occur on the webpage?
A. The blank space will be shown in black
B. The image won't be displayed
C. The image will be stretched
D. The image will be repeated
21. In HTML ______ tag contains the information about the current document such as title etc.
A. Body
B. TD
C. Head
D. None of the above
22. In which part of the HTML5 metadata is contained?
A. head tag
B. title tag
C. html tag
D. body tag
23. JPEG stands for ______.
A. Joint photographic embedded group
B. Joint photographic extended group
C. Joint photographic experts group
D. None of the above
24. The correct sequence of HTML tags for starting a webpage is -
A. Head, Title, HTML, body
B. HTML, Body, Title, Head
C. HTML, Head, Title, Body
D. Title, HTML, Head, Body
25. The default value of the BORDER attribute is?
A. 1 pixel
B. 2 pixel
C. 4 pixel
D. 8 pixel
26. The default value of the BORDER attribute is?
A. 1 pixel
B. 2 pixel
C. 4 pixel
D. 0 pixel
27. The element to specify a list of predefined options for input controls is:
A. <embed>
B. <datalist>
C. <source>
D. <track>
28. The following HTML tag is used to display the content as a moving text.
A. <marquee>
B. </img>
C. <a href>
D. None of the above
29. The purpose of markup is to ______
A. add hypertext capabilities
B. enhance the document
C. both A & B
D. none of the above
30. The symbol that identities that HREF attribute as the name of a NAME anchor rather than an address or filename is
A. &
B. $
C. #
D. !
31. The tag to specify illustrations, diagrams, photos is
A. <mark>
B. <figure>
C. <aside>
D. <details>
32. The title to be displayed at the top of the browser window or browser tab is enclosed in ____
A. <HTML>---</HTML>
B. <HEAD>---</HEAD>
C. <TITLE>---</TITLE>
D. <BODY>---</BODY>
33. The value of ______ attribute is a URL that designates a source document or message for the information inserted.
A. href
B. src
C. msg
D. cite
34. URL is an acronym for ______
A. Universal research locator
B. Universal resource locator
C. Uniform research locator
D. Uniform resource locator
35. We enclose HTML tags within?
A. {}
B. <>
C. !!
D. None of the above
36. What are the attributes used to change the size of an image?
A. Width and Height
B. Big and Small
C. Top and Bottom
D. None of the above
37. What are the types of unordered lists in HTML?
A. Circle, square, disc
B. Triangle, Square, disc
C. Triangle, Circle, disc
D. All of the above
38. What HTML tag is used to define the contact information for the author/owner of a document or an article?
A. <contact>
B. <authorinfo>
C. <address>
D. <addr>
39. What is CSS?
A. CSS is a style sheet language
B. CSS is designed to separate the presentation and content, including layout, colors, and fonts
C. CSS is the language used to style the HTML documents
D. All of the mentioned
40. What is the correct HTML syntax of <abbr> tag?
A. <abbr description="abbreviation or acronym">Text</abbr>
B. <abbr title="abbreviation or acronym">Text</abbr>
C. <abbr abbreviation="abbreviation or acronym">Text</abbr>
D. <abbr acronym="abbreviation or acronym">Text</abbr>
41. What is the effect of the <b> tag?
A. It converts the text within it to bold font
B. It is used to write black-colored font
C. It is used to change the font size
D. None of the above
42. What is the select tag used for?
A. Creates a combo box
B. Select some attributes and change their style
C. Change text font
D. None of the above
43. What is the smallest header in HTML by default?
A. h1
B. h2
C. h6
D. h4
44. What is the use of <hr> tag in HTML?
A. For making content appearance italics
B. To create vertical rule between sections
C. To create a line break
D. To create horizontal rule between sections
45. Which ____ attribute specifies where to open the linked document?
A. href
B. link
C. src
D. target
46. Which attribute set the text direction
A. direction
B. lang
C. dir
D. sub
47. Which CSS property determines how much the text should be emblazoned?
A. Font-Weight
B. Font-Size
C. Font-family
D. Font-Style
48. Which element is used for styling HTML5 layout?
A. CSS
B. jQuery
C. JavaPoint
D. PHP
49. Which element is used to get highlighted text in HTML5?
A. <u>
B. <mark>
C. <highlight>
D. <b>
50. Which HTML element is used for short quote?
A. <em>
B. <abbr>
C. <q>
D. <blockquote>
51. Which HTML element is used to define description data?
A. <li>
B. <ol>
C. <dd>
D. <ul>
52. Which HTML tag is used for making character appearance bold?
A. <u>content</u>
B. <b>content</b>
C. <br>content</br>
D. <i>content</i>
53. Which HTML tag is used to define an abbreviation or an acronym?
A. <abbreviation>
B. <abbr>
C. <acronym>
D. <acr>
54. Which HTML tag is used to define strike a line through deleted text?
A. <delete>
B. <del>
C. <deleted>
D. <through>
55. Which HTML tag is used to insert an image?
A. <img url="htmllogo.jpg" />
B. <img alt="htmllogo.jpg" />
C. <img link="htmllogo.jpg" />
D. <img src="htmllogo.jpg" />
56. Which is the correct HTML statement to define the red color of the paragraph text?
A. <p style="color: #ff0000;">
B. <p style="color: red;">
C. Both A and B
D. None of the above
57. Which is the correct syntax of <a> tag?
A. <a src="url">link text</a>
B. <a link="url">link text</a>
C. <a href="url">link text</a>
D. <a srclink="url">link text</a>
58. Which of the following can't be the value of list-style-type?
A. square
B. circle
C. ellipse
D. disc
59. Which of the following CSS property can be used to set the image as a background image?
A. background-image:url('bg.jpg')
B. background-image-source:'bg.jpg'
C. background-image:'bg.jpg'
D. img src='bg.jpg'
60. Which of the following CSS property is used to make the text bold?
A. text-decoration: bold
B. font-weight: bold
C. font-style: bold
D. text-align: bold
61. Which of the following CSS style property is used to specify a font-name?
A. font
B. font-style
C. font-family
D. font-face
62. Which of the following extension is used to save an HTML file?
A. .js
B. .css
C. .htl
D. .html
63. Which of the following input control is used fields that should contain an URL address?
A. email
B. url
C. range
D. number
64. Which of the following is not a new feature of HTML5?
A. Use <canvas> element for 2D drawing
B. Use <video> elements for media playback
C. Use <audio> elements for media playback
D. All of the above are new features
65. Which of the following is the correct way to change the font face in HTML?
A. <font = "Calibri"> ........ </font>
B. <style="font-family : "Calibri"> ........ </style>
C. <style="font-name : "Calibri"> ........ </style>
D. None
66. Which of the following is true?
A. <br> inserts a single line break in the text.
B. In tables, the header cell is centered by default and the data cells are right-aligned.
C. The <TR> is used to create a data cell.
D. INPUT tag must have at least 4 attributes.
67. Which of the following tag is used to embed CSS in html page?
A. <css>
B. <!DOCUMENT html>
C. <script>
D. <style>
68. Which of the following tag represents an independent piece of content of a document in HTML5?
A. section
B. article
C. aside
D. header
69. Which of the following tag represents an independent piece of content of a document in HTML5?
A. <section>
B. <article>
C. <aside>
D. <header>
70. Which of the following tag represents the footer of a section in HTML5?
A. footer
B. nav
C. section
D. dialog
71. Which of the following tags do not require a terminator?
A. <u>
B. <br>
C. <b>
D. <a>
72. Which of the following tags doesn't require a closing tag?
A. <br>
B. <hr>
C. Both A & B
D. None of the above
73. Which of the following tags is used to add a row to a table in HTML?
A. <tr>
B. <td>
C. <th>
D. None of the above
74. Which of the following tags is used to indicate the page's start and endpoints?
A. <body>
B. <html>
C. <head>
D. <!doctype>
75. Which of the following things are necessary to create an HTML page?
A. A text editor
B. Web Browser
C. Both A & B
D. None of the above
76. Which property allows an image link to show a text label?
A. str
B. alt
C. alternative
D. None of the above
77. Which property is used to set border colors in HTML?
A. border-color
B. border
C. Both A and B
D. None of the above
78. Which tag is used to create a numbered list in HTML?
A. <ol>
B. <ul>
C. <li>
D. <il>
79. Which tag is used to display a horizontal rule (horizontal line)?
A. <br>
B. <hr>
C. <hr> ... </hr>
D. <line>
80. Which tag is used to underline the text in HTML?
A. <p>
B. <u>
C. <i>
D. <ul>
81. Who is the father of HTML?
A. Rasmus Lerdorf
B. Tim Berners-Lee
C. Brendan Eich
D. Sergey Brin
$floatBtn