0% found this document useful (0 votes)
5 views

html mcq

The document contains multiple choice questions and true/false statements about HTML, covering topics such as document structure, tags, attributes, and lists. It also includes explanations of HTML elements like <table>, inline styles, and comments. The content serves as a quiz or study guide for understanding HTML fundamentals.

Uploaded by

Saharsh Naik
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

html mcq

The document contains multiple choice questions and true/false statements about HTML, covering topics such as document structure, tags, attributes, and lists. It also includes explanations of HTML elements like <table>, inline styles, and comments. The content serves as a quiz or study guide for understanding HTML fundamentals.

Uploaded by

Saharsh Naik
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Multiple Choice Questions:

1. All HTML documents must start with a document type declaration which is written as
________
a) <!DOCTYPE html>
b) <DOCTYPE html>
c) <!DOCTYPE >
d) </DOCTYPE html>

2. The extension of the web page file is __________


a) html
b) css
c) .html
d) .http

3. The full form of ‘html’ is ________


a) hypertext makeup language
b) hypertext markup language
c) hypertext multiple language
d) hometool markup language

4. Which html element is used for the largest heading


a) <h6>
b) <h1>
c) <heading>
d) <head1>

5. The html element for break of line is


a) <br>
b) <break>
c) <hr>
d) <linebreak>
6. Which attribute is used to specify a URL for an image in the <img> tag?
a) link
b) src
c) href
d) alt

7. Which HTML tag is used to display the title of the document in the browser title bar?
a) <meta>
b) <title>
c) <head>
d) <header>

8. Which tag is used to make a numbered list in HTML?


a) <ul>
b) <ol>
c) <dl>
d) <li>

9. which of these elements are all Table elements?


a) <table><tr><td>
b) <table><tr><tt>
c) <thead><tr><td>
d) <caption> <tr><tt>

10. What is the correct HTML tag for inserting an image?


a) <image>
b) <img>
c) <picture>
d) <src>
11. Which HTML tag is used to define a paragraph?
a) <para>
b) <pg>
c)<p>
d) <paragraph>

12. which attribute specifies the destination address of a hyperlink in an <a> tag?
a) link
b) href
c) src
d) target

13. Which HTML attribute is used to define inline styles?


a) class
b) styles
c) style
d) font

14. Which tag is used to define a list item?


a) <list>
b) <li>
c) <ul>
d) <ol>

15. Which is the correct HTML for adding a background colour?


a) <body bg=yellow>
b) <body bgcolour=yellow>
c) <body background=yellow>
d) <body bgcolor=yellow>
16. Which HTML tag is used to define a horizontal line
a) <hr>
b) <hl>
c) <br>
d) <line>

17. Which html element is used to define bold text?


a) <i>
b) <br>
c) <em>
d) <b>

18. The HTML element defines preformatted text.


a) <p>
b) <b>
c)<pre>
d) <hr>

19. The visible part of the HTML document is between_____


a) <title>
b) <head>
c) <body>
d) <meta>

20. There are ____ number of heading tags in Html.


a) 10
b) 8
c) 5
d) 6
21. Which among the options is an empty tag?
a) <title>
b) <br>
c) <body>
d) <b>An unordered list starts with the <ul>tag

22. The tag used to write H2O is _______.


a) <sub>
b) <sup>
c) <em>
d)<u>

23. The ________ tag of HTML is used for creating scrollable text or images.
a) <img>
b) <marquee>
c) <text>
d) <a>

24. Images are ______ to web pages.


a) pasted
b) inserted
c) linked
d) none of the above

25. ________ is a hyperlink tag where we can specify any link.


a) <a>
b) <href>
c) <src>
d) <hyperlink>
26. An unordered list starts with the ______tag
a) <ol>
b) <ul>
c) <u>
d) none of the above
27. ______ tag stands for table row.
a) <tr>
b)<td>
c) <tl>
d) <th>

28. The _________ tag is an empty tag.


a) <table>
b) <ul>
c) <img>
d) <a>

29. In html, the images are either inline or __________


a) internal
b) external
c) background
d) linked

30. The attribute of Marquee tag which controls the scrolling speed is ______.
a) scrollamount
b) speed
c) amount
d) scroll

State whether True ot false:


1. HTML stands for HyperText Markup Language. - True
2. The <br> tag is used to create a horizontal line in HTML.- False
3. The <img> tag requires a closing tag. - False
4. . The <title> tag is placed inside the <head> of an HTML document.-True
5. The <body> tag contains all the visible content on the webpage.-True
6. The href attribute in the <a> tag specifies the URL of the link.-True
7. The <h6> tag represents the smallest heading in HTML.- True
8. The alt attribute in an <img> tag provides alternative text for the image.-True
9. You can use multiple <body> tags in a single HTML document. -False
10. HTML is case-sensitive.-False
Question answers: (3-4 sentences)
1. Explain the structure of an HTML document.
Ans: <!DOCTYPE html>: This declaration is placed at the very top of the document and
defines the document type and version of HTML.
<html>: The root element that encloses all the content of the HTML document. It contains
two main sections: <head> and <body>.
<head>: This section contains metadata about the document, including the title.
<title>: Specifies the title of the document that appears in the browser title bar.
<body>: This section contains the actual content of the webpage, including text, images,
videos, links, and other elements.

2. What are the different types of lists in HTML,


Ans: HTML supports three main types of lists:
 Ordered List (<ol>): The list items are numbered sequentially by default. Ex
1,2,3...
 Unordered List (<ul>): This list is used for items that do not need to be in any
specific order. The list items are usually marked with bullets.
 Definition List (<dl>): This list is used for a list of terms and their definitions.

3. What are HTML attributes, and how do they modify the behavior or appearance of
an HTML element?
Ans: HTML attributes are additional information included in an HTML tag that modify the
behavior or appearance of an element. For example, the href attribute in an <a> tag
specifies the URL of the link.

4. How does the <table> element work in HTML, and what are the roles of <tr>,
<td>, and <th> tags within it?
Answer: The <table> element in HTML is used to create a table with raws and columns.
The <tr> tag defines a table row, <td> defines a standard data cell within a row, and
<th> defines a header cell, which is typically bold and centered.
5. What are inline styles in HTML, and how do they differ from internal and external
stylesheets?
Ans: Inline styles are CSS styles applied directly to an HTML element using the style
attribute. Unlike internal styles (placed within a <style> tag in the <head>) or external
stylesheets (linked via a <link> tag). Inline styles only affect the specific element they are
applied to.

6. What are comments in html ?


Ans: In HTML, comments are used to insert notes or explanations within the code that are
not displayed on the webpage. They make the code easier to understand and maintain.
Comments are added using <!-- comment -->. and they are not visible to users in the
browser

You might also like