top of page

HTML MCQ Questions & Answers

Writer's picture: Rajesh SinghRajesh Singh

Updated: Dec 30, 2024

HTML MCQ:



Q1. HTML Full form:


a.       HighText Machine Language

b.       HyperText and links Markup Language

c. Hyper Text Marquee Language

d. HyperText Markup Language



Answer: d

Q2. 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. HTML, Head, Body, Title

Answer: c


Q3. What is HTML?

a. HTML describes the structure of a webpage of website

b. HTML is markup language and generally used to create web pages

c. HTML consists of a set of elements that helps the browser how to view the content

d. All of the Above

Answer: d

Q4. HTML is developed by

a. Lary Page

b. Tim Berners-Lee

c. Brendan Eich

d. Sergey Brin

Answer: b

Q5. Which tag is used for the text bold in HTML?


a. <pre>

b. <a>

c. <b>

d. <br>

Answer: c

Q6. Which tag is used for inserting the smallest heading in HTML?

a. <h3>

b. <h1>

c. <h5>

d. <h6>

Answer: d

Q7. The correct syntax of doctype in HTML5?

a. </doctype html>

b. <doctype html>

c. <doctype html!>

d. <!doctype html>

Answer: d.

Q8. Which tag is used to insert a line-break in HTML?

a. <br>

b. <break>

c. <hr>

d. <b>

Answer: a.

Q9. Which tag is used for an ordered list in HTML?

a. <ul>

b. <ol>

c. <li>

d. <i>

Answer: b.

Q10. Which symbol is used to represent the closing of a tag in HTML?


a. \

b. //

c. /

d. ??

Answer: c

Q11. Which is used to read an HTML page and render it?

a. Web server

b. domain

c. Web browser

d. Web hosting

Answer: c

Q12. Which tag is used for text italic in HTML?

a. <i>

b. <italic>

c. <it>

d. <italik>

Answer: a



Q13. Which is not a difference between HTML and XHTML?

a. Charset is “text/html” in both html and xhtml.

b. Tags and attributes are non case sensitive in HTML but not in XHTML

c. Special characters must be escaped using character entities in XHTML unlike HTML

d. None of Above

Answer: a

Q14. What is image tag in HTML?

a. <img href = "tkd.png" />

b. <img url = "tkd.png" />

c. <img link = "tkd.png" />

d. <img src = "tkd.png" />

Answer: d

Q15. What is code for insert a background color in HTML?


a. <marquee bg.color: "green">

b. <marquee bg-color = "green">

c. <marquee bgcolor = "green">

d. <marquee color = "green">

Answer: c

Q16. Which tag has metadata of HTML?

a. head tag

b. img tag

c. html tag

d. body tag

Answer: a

Q17. Which tag is used to get highlighted text in HTML5?

a. <highlight>

b. <mark>

c. <highlighted>

d. <highlights>

Answer: b

Q18. Which tag is not a HTML5?

a. <track>

b. <video>

c. <slider>

d. <header>

Answer: c

Q19. Comments in HTML?

a. </…….>

b. <!……>

c. </……/>

d. <…….!>

Answer: b



Q20. <input> tag is ----


a. A format tag.

b. An empty tag.

c. Both a and b

d. None

Answer: b

Q21. The code to create a checkbox in HTML?

a. <input type = "checkbox">

b. <input type = "box">

c. <input =”checkbox”>

d. <input type = "check">

Answer: a

Q22. Which tag is used to drop-down selection list in HTML?

a. <select>

b. <list>

c. <dropdown>

d. <option>

Answer: d

Q23. Which tag is used to video in HTML5?

a. <video>

b. <movie>

c. <audio>

d. <media>

Answer: a

Q24. Which is not below element with the HTML table layout?

a. alignment

b. spanning

c. size

d. color

Answer: d

Q25. Which element is used for style in HTML5?

a. CSS

b. design

c. JavaScript

d. Java

Answer: a



Q26. HTML is a subset of

a. SGMD

b. SGML

c. SGMG

d. None of the them

Answer: b

Q27. Which code to create a hyperlink in HTML?

a. <a link = “www.careerbodh.in”> Career Bodh Sansthan </a>

b. <a> www. www.careerbodh.in/Career Bodh Sansthan </a>

c. <a href = “www. www.careerbodh.in”> Career Bodh Sansthan </a>

d. <a url = “www. www.careerbodh.in”> Career Bodh Sansthan</a>

Answer: c

Q28. ALL HTML tags are enclosed in ---

a. ( and )

b. [ and ]

c. < and >

d. { and }

Answer: c

Q29. Which tag is used to add rows in the table?

a. <td> and </td>

b. <th> and </th>

c. <tr> and </tr>

d. <tr> and <tr>

Answer: c

Q30. Which code will make an image clickable in HTML?


a. <a href="https://www.careerbodh.in">Home Page</a>

b. <img src="logo.jpg"><a href="https://www. careerbodh.in ">Home Page</a></img>

c. <a href="https://www. careerbodh.in ">Home Page</a><img src="logo.jpg" >

d. <a href="https://www. careerbodh.in "><img src="logo.jpg" /></a>

Answer: d

HTML MCQ asked O Level July 2022 Exam:

Q31. What is true for HTML ?

(A) It is used to design static web pages.

(B) It is used to design dynamic web pages

(C) Both (A) and (B) are true

(D) None is true

Ans: C

Q32. The proper sequence of tags in HTML while coding for a web page is :

(A) < HTML >, <TITLE>, <BODY>, <HEAD>

(B) <HEAD>, <HTML>, <TITLE>, <BODY>

(C) <HTML>,<HEAD>,<TITLE>,< BODY>

(D) <HTML>, <HEAD>, <BODY>, <TITLE>

Ans: C

Q33. Which HTML tag is used to declare internal CSS :

(A) <style>

(B) <Head>

(C) <link>

(D) <Script>

Ans: A

Q34. All the tags present in HTML are :

(A) Non - Case Sensitive

(B) Lower Case

(C) Upper Case

(D) Case Sensitive

Ans: A

Q35. The HTML <iframe> tag specifies.

(A) an inline frame

(B) an outline frame

(C) vertical frame

(D) horizontal frame

Ans: A

Q36. The root element is another name of which of the following tags ?

(A) <head>

(B) <BODY>

(C) < element >

(D) < HTML >

Ans: D

Q37. Document Object Model represents :

(A) Whole HTML Document

(B) only <title> element

(C) <body>..</body> element

(D) none of the above

Ans: A

Q38. Which tags won’t get affected if their closing tags are not used in html ?

(A) <html>

(B) <hr>

(C) <br>

(D) Both (B) and (C)

Ans: D

Q39. How many heading tags are available in HTML by default ?

(A) 2

(B) 6

(C) 4

(D) 7

Ans: B

Q40. An HTML program can be compiled using which extension ?

(A) .html and .ht

(B) .ht and .htm

(C) .html and .h

(D) .htm and .html

Ans: D

Q41. What is the output of below program:

<html>

<body>

<script>

var number=50;//global variable

function a(){

alert(number);

}

function b(){

alert(number);

}

a();

</script>

</body>

</html>

(A) 50

(B) Error

(C) Number

(D) None of the above

Ans: A

Q42.

<!DOCTYPE html>

<html>

<body>

<h2>The name Attribute</h2>

<form method = “get”>

First name:<br> <input type="text" value="Shivansh"> <br>

Last name:<br> <input type="text" name="lastname" value="kumar"> <br>

<input type="submit" value="Submit">

</form>

</body>

</html>

In the above code, the name attribute is missing (bold line ). What will be the effect of not using the name attribute ?

(A) Value of that input field will not be submitted

(B) Value of that input field will be submitted

(C) The above code will get an error

(D) None of these

Ans: B



HTML QUESTIONS VIDEO:



812 views0 comments

Recent Posts

See All

Soft skills-Personality Development MCQ

Q1. Which of the following is NOT a hard skill? A.    Typing Speed B.     Machine Operation C.     Time Management D.    Coding Ans: C...

IOT Sensor MCQ

Sensor MCQ for O level Exam: Q1. Which sensor is used in Mobile phones? A.      Capacitive Touch Sensor B.      Temperature Sensor...

Comments


bottom of page