HTML MCQ PDF [Top 40 Questions] Crack Every Exam

HTML MCQ PDF. Top html objective multiple choice questions and answers. Helpful for interview, competitive exams, HSC, O level, Class 10, Class 8, COPA, JOA IT etc.

HTML MCQ PDF

1. The HTML global attribute, “contenteditable” is used to:

a) Update content from the server

b) Specifies a context menu for an element. The menu appears when a user right-click on the element

c) Specify whether the content of an element should be editable or not

d) Return the position of the first found occurrence of content inside a string

Ans. c

2. In HTML, onblur and on onfocus are:

a) HTML elements

b) Style attributes

c) Event attributes

d) None of these

Ans. c

3. Graphics defined by SVG is in which format?

a) HTML

b) XML

c) CSS

d) Java

Ans. b

4. The HTML <canvas> element is used to:

a) manipulate data in MySQL

b) create draggable elements

c) draw graphics

d) display database records

Ans. c

5. In HTML, which attribute is used to specify that an input field must be filled out?

a) required

b) placeholder

c) validate

d) formvalidate

Ans. a

6. Which input type defines a slide control?

a) range

b) slider

c) search

d) controls

Ans. a

7. Which HTML element is used to display a scalar measurement within a range?

a) <measure>

b) <range>

c) <gauge>

d) <meter>

Ans. D

8. Which HTML element defines navigation links?

a) <navigation>

b) <navigate>

c) <nav>

d) None of these

Ans. c

9. In HTML, what does the <aside> element define?

a) The ASCII character-set; to send information between computers on the internet

b) A navigation list to be shown at the left side of the page

c) Content aside from the page content

d) None of these

Ans. c

10. Which HTML element is used to specify a header for a document or section?

a) <section>

b) <top>

c) <header>

d) <head>

Ans. c

11. Which of these elements are all <table> elements?

a) <table> <tr> <td>

b) <table> <tr> <tt>

c) <thead> <body> <tr>

d) <table> <head> <tfoot>

Ans. a

12. Inline elements are normally displayed without starting a new line.

a) True

b) False

Ans. a

13. How can you make a numbered list?

a) <ol>

b) <list>

c) <ul>

d) <dl>

Ans. a

14. How can you make a bulleted list?

a) <dl>            

b) <ul>            

c) <ol>            

d) <list>

Ans. b

15. What is the correct HTML for making a checkbox?

a) <input type= “checkbox”>

b) <checkbox>

c) <input type= “check”>

d) <check>

Ans. a

16. What is the correct HTML for making a text input field?

a) <input type= “textfield”>

b) <textfield>

c) <textinput type = “text”>

d) <input type= “text”>

Ans. d

17. What is the correct HTML for making a drop-down list?

a) <list>

b) <select>

c) <input type = “list”>

d) <input type= “dropdown”>

Ans. b

18. What is the correct HTML for making a text area?

a) <input type= “textarea”>

b) <input type= “textbox”>

c) <textarea>

d) None of these

Ans. c

19. 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”>

Ans. a

20. What is the correct HTML for inserting a background image?

a) <background img= “background.gif”>

b) <body style= “background-image:url(background.gif)”>

c) <body bg=”background.gif”>

d) None of these

Ans. b

21. An <iframe> is used to display a web page within a web page.

a) There is no such thing as an <iframe>

b) True

c) False

d) None of these

Ans. b

22. HTML comments start with <!—and end with –>

a) True

b) False

c) No Idea

d) None of these

Ans. a

23. Block elements are normally displayed without starting a new line.

a) True

b) False

Ans. b

24. Which HTML element defines the title of a document?

a) <meta>

b) <head>

c) <title>

d) None of these

Ans. c

25. Which HTML attribute specifies an alternate text for an image, if the image cannot be displayed?

a) longdesc

b) src

c) title

d) alt

Ans. d

26. Which doctype is correct for HTML5?

a) <!DOCTYPE HTML PUBLIC “-//WWW//DTD HTML 5.0//EN”  http://www.YouTube.com>

b) <!DOCTYPE html>

c) <!DOCTYPE HTML5>

d) None of these

Ans. b

27. Which HTML element is used to specify a footer for a document or section?

a) <bottom>

b) <footer>

c) <section>

d) None of these

Ans. b

28. In HTML, You can embed SVG elements directly into an HTML page.

a) True

b) False

c) No idea

d) None of these

Ans. a

29. What is the correct HTML element for playing video files?

a) <video>

b) <media>

c) <movie>

d) None of these

Ans. a

30. What is the correct HTML element for playing audio files?

a) <mp3>        

b) <sound>     

c) <audio>      

d) None of these

Ans. C

31. What does HTML Stand for?

a) Hyperlinks and Text markup language     

b) Home tool markup language

c) Hyper Text Markup Language                   

d) None of these

Ans. c

32. Who is making the web Standards?

a) Google       

b) Microsoft

c) Mozilla       

d) The World Wide Web Consortium

Ans. d

33. Choose the correct HTML element for the largest heading:

a) <head>       

b) <h1>           

c) <h6>                       

d) <heading>

Ans. b

34. What is the correct HTML element for inserting a line break?

a) <break>      

b) <br>                       

c) <lb>            

d) None of these

Ans. b

35. What is the correct HTML for adding a background color?

a) <body bg=”yellow”>

b) <body style= “background-color:yellow;”>

c) <background>yellow</background>

d) none of these

Ans. b

36. Choose the correct HTML element to define important text

a) <important>           

b) <b>             

c) <strong>     

d) <i>

Ans. c

37. Choose the correct HTML element to define emphasized text

a) <em>          

b) <italic>       

c) <i>              

d) None of these

38. What is the correct HTML for creating a hyperlink?

a) <a name=”http://www.YouTube.com”> YouTube</a>

b) <a href=”http://www.YouTube.com”>YouTube</a>

c) <a url=”http://www.YouTube.com”>YouTube</a>

d) <a>http://www.YouTube.com</a>

Ans. b

39. Which character is used to indicate an end tag?

a) /     

b) <     

c) *     

d) ^

Ans. a

40. How can you open a link in a new tab/browser window?

a) <a href=”url” target=”new”>        

b) <a href=”url” target=”_blank”>

c) <a href=”url” new>                        

d) None of these

Ans. b

HTML MCQ PDF [Download]
HTML MCQ Questions and Answers PDF [230 MCQs for all exams]
CSS MCQ Questions and answers PDF [120 Important MCQs]
Computer GK [10000 MCQ PDF] Questions for Competitive Exams
WhatsApp Channel Join Now
Telegram Channel Join Now
Instagram Page Join Now