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

HTML One Mark questions

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

HTML One Mark questions

HTML
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 29

HTML Multiple choice questions (MCQ's)

1) HTML stands for -

a. HighText Machine Language


b. HyperText and links Markup Language
c. HyperText Markup Language
d. None of these

Hide Answer Workspace

Answer: (c) HyperText Markup Language

Explanation: HTML is an acronym that stands for HyperText


Markup Language, which is used for creating web pages and web
applications.

HyperText simply means "Text within Text." A text has a link


within it, is a hypertext. A markup language is a computer
language that is used to apply layout and formatting conventions
to a text document.

2) 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, Title, Body

Hide Answer Workspace

Answer: (d) HTML, Head, Title, Body

Explanation: The correct sequence of HTML tags to start a


webpage is html, head, title, and body.
3) Which of the following element is responsible for making the
text bold in HTML?

a. <pre>
b. <a>
c. <b>
d. <br>

Hide Answer Workspace

Answer: (c) <b>

Explanation: The <b> (bold tag) tag in HTML is used to display


the written text in bold format.

4) Which of the following tag is used for inserting the largest


heading in HTML?

Backward Skip 10sPlay VideoForward Skip 10s


a. <h3>
b. <h1>
c. <h5>
d. <h6>

Hide Answer Workspace

Answer: (b) <h1>

Explanation: The <h1> tag is used to insert the main heading or


the highest level heading.

5) Which of the following tag is used to insert a line-break in


HTML?

a. <br>
b. <a>
c. <pre>
d. <b>

Hide Answer Workspace

Answer: (a) <br>

Explanation: The <br> tag in the HTML document is used to


create a line break in a text. If we place the <br> tag in HTML
code, then it works the same as pressing the enter key in a word
processor.

6) How to create an unordered list (a list with the list items in


bullets) in HTML?

a. <ul>
b. <ol>
c. <li>
d. <i>

Hide Answer Workspace

Answer: (a) <ul>

Explanation: The <ul> tag in HTML is used to display the list


items in a bulleted format. There can be four types of an
unordered list: disc, circle, square, and none.

7) Which character is used to represent the closing of a tag in


HTML?

a. \
b. !
c. /
d. .

Hide Answer Workspace

Answer: (c) /

Explanation: The forward-slash (/) character is used to indicate


the closing of a tag in HTML.

8) How to create a hyperlink in HTML?

a. <a href = "www.javatpoint.com"> javaTpoint.com </a>


b. <a url = "www.javatpoint.com" javaTpoint.com /a>
c. <a link = "www.javatpoint.com"> javaTpoint.com </a>
d. <a> www.javatpoint.com <javaTpoint.com /a>

Hide Answer Workspace

Answer: (a) <a href = "www.javatpoint.com"> javaTpoint.com


</a>

Explanation: The anchor tag and the href attribute is used to


create the link in HTML.

9) How to create an ordered list (a list with the list items in


numbers) in HTML?

a. <ul>
b. <ol>
c. <li>
d. <i>

Hide Answer Workspace

Answer: (b) <ol>


Explanation: The <ol> tag in HTML is used to display the list
items in a numbered format. There can be different types of
numbered list: numeric number, capital alphabet, small alphabet,
etc.

10) Which of the following element is responsible for making the


text italic in HTML?

a. <i>
b. <italic>
c. <it>
d. <pre>

Hide Answer Workspace

Answer: (a) <i>

Explanation: The <i> (italic tag) tag in HTML is used to display


the written text in italic format.

11) How to insert an image in HTML?

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


b. <img url = "jtp.png" />
c. <img link = "jtp.png" />
d. <img src = "jtp.png" />

Hide Answer Workspace

Answer: (d) <img src = "jtp.png" />

Explanation: The img tag and the src attribute is used to display
an image on the webpage.

12) How to add a background color in HTML?


a. <marquee bg color: "red">
b. <marquee bg-color = "red">
c. <marquee bgcolor = "red">
d. <marquee color = "red">

Hide Answer Workspace

Answer: (c) <marquee bgcolor = "red">

Explanation: The bgcolor attribute is used to set the


background color of an HTML element.

13) <input> is -

a. a format tag.
b. an empty tag.
c. All of the above
d. None of the above

Hide Answer Workspace

Answer: (b) an empty tag

Explanation: The <input> tag in HTML is used to represent a


form input control in HTML document.

14) Which of the following tag is used to make the underlined


text?

a. <i>
b. <ul>
c. <u>
d. <pre>
Hide Answer Workspace

Answer: (c) <u>

Explanation: The <u> (underline tag) tag in HTML is used to


display the underlined text. It rendered as a solid underlined text,
but it can be changed using CSS properties.

15) How to create a checkbox in HTML?

a. <input type = "checkbox">


b. <input type = "button">
c. <checkbox>
d. <input type = "check">

Hide Answer Workspace

Answer: (a) <input type = "checkbox">

Explanation: To create a checkbox in HTML, we have to use


the <input> tag and give the value checkbox to
its type attribute.

16) Which of the following tag is used to define options in a drop-


down selection list?

a. <select>
b. <list>
c. <dropdown>
d. <option>

Hide Answer Workspace

Answer: (d) <option>


Explanation: The <option> tag in HTML is used to define options
in a dropdown list within <select> or <datalist> element. A
dropdown list must have at least one <option> element.

17) HTML tags are enclosed in-

a. # and #
b. { and }
c. ! and ?
d. < and >

Hide Answer Workspace

Answer: (d) < and >

Explanation: All HTML tags must be enclosed within angular <


> brackets.

18) Which of the following tag is used to add rows in the table?

a. <td> and </td>


b. <th> and </th>
c. <tr> and </tr>
d. None of the above

Hide Answer Workspace

Answer: (c) <tr> and </tr>

Explanation: The <tr> tag in HTML is used to define the rows in


the table. It can consist one or more <th> head cells and <td>
data cells to define a single row of HTML table.
19) The <hr> tag in HTML is used for -

a. new line
b. vertical ruler
c. new paragraph
d. horizontal ruler

Hide Answer Workspace

Answer: (d) horizontal ruler

Explanation: The <hr> tag is used to specify a paragraph-level


thematic break in HTML document. It is called a horizontal rule
and draws a horizontal line.

20) Which of the following attribute is used to provide a unique


name to an element?

a. class
b. id
c. type
d. None of the above

Hide Answer Workspace

Answer: (b) id

Explanation: The id attribute is used to specify a unique id for


an element of the HTML document. It allocates the unique
identifier which can be used by the JavaScript and CSS to perform
certain tasks.

21) Which of the following HTML tag is used to display the text
with scrolling effect?

a. <marquee>
b. <scroll>
c. <div>
d. None of the above

Hide Answer Workspace

Answer: (a) <marquee>

Explanation: The <marquee> tag is a non-standard HTML


element that is used to scroll a text or image either horizontally or
vertically. In simple words, we can say that it automatically scrolls
the image or text in up, down, left, and right direction.

22) Which of the following HTML tag is the special formatting tag?

a. <p>
b. <b>
c. <pre>
d. None of the above

Hide Answer Workspace

Answer: (c) <pre>

Explanation: The HTML <pre> tag is used to specify pre-


formatted texts. Texts within <pre>…</pre> tag is displayed in a
fixed-width font. Usually, it is displayed in courier font. It
maintains both line break space.

ADVERTISEMENT

23) Which of the following is the correct way to send mail in


HTML?

a. <a href = "mailto: xy@y">


b. <a href = "xy@y">
c. <mail xy@y</mail>
d. None of the above

Hide Answer Workspace

Answer: (a) <a href = "mailto: xy@y">

Explanation: We can use the <a> (anchor tag) tag, and the href
attribute to mail a person.

24) Which of the following is the container for <tr>, <th>, and
<td> ?

a. <data>
b. <table>
c. <group>
d. All of the above

Hide Answer Workspace

Answer: (b) <table>

Explanation: The <table> tag in HTML, is generally used to


display data in tabular format. We can create a table to display
the data in the tabular form using the <table> element, with the
help of <tr>, <th>, and <td> elements.

25) How to insert a background image in HTML?

a. <body background = "img.png">


b. <img background = "img.png">
c. <bg-image = "img.png">
d. None of the above

Hide Answer Workspace


Answer: (a) <body background = "img.png">

Explanation: To apply a background image on entire document,


we have to specify the background attribute in the <body> of
the HTML document.

26) What are the types of unordered or bulleted list in HTML?

a. disc, square, triangle


b. polygon, triangle, circle
c. disc, circle, square
d. All of the above

Hide Answer Workspace

Answer: (c) disc, circle, square

Explanation: The unordered or bulleted list in HTML is used to


display the elements in a bulleted format. Mainly, there are three
types of an unordered list: disc, circle, and square.

27) Which of the following is the correct way to create a list using
the lowercase letters?

a. <ol alpha = "a" >


b. <ol type = "a">
c. <ol letter = "a">
d. None of the above

Hide Answer Workspace

Answer: (b) <ol type = "a">

Explanation: The type attribute is used with the <ol> tag to


specify the type of list items.
28) Which of the following is the correct way to start an ordered
list with the count of numeric value 4?

a. <ol type = "1" initial = "4">


b. <ol type = "1" begin = "4">
c. <ol type = "1" num = "4">
d. <ol type = "1" start = "4">

Hide Answer Workspace

Answer: (d) <ol type = "1" start = "4">

Explanation: The start attribute is used with the <ol> tag to


specify where to start the list items.

29) Which of the following HTML attribute is used to define inline


styles?

a. style
b. type
c. class
d. None of the above

Hide Answer Workspace

Answer: (a) style

Explanation: The style attribute in HTML is used to change the


style of existing HTML elements. It can be used with any HTML
tag. To apply the style on the HTML tag, you should have the
basic knowledge of CSS properties.

30) Which of the following is the paragraph tag in HTML?


a. <p>
b. <b>
c. <pre>
d. None of the above

Hide Answer Workspace

Answer: (a) <p>

Explanation: The <p> (paragraph tag) tag in HTML is used to


define a paragraph in a webpage. The HTML <p> tag indicates
the starting of new paragraph.

31) An HTML program is saved by using the ____ extension.

a. .ht
b. .html
c. .hml
d. None of the above

Hide Answer Workspace

Answer: (b) .html

Explanation: The .html or .htm extension both are used to save


the HTML program. We can save our HTML file either by using
the .html extension or by .htm extension. When the file
delivered to the network, the HTML extension indicates that the
content of file is HTML.

32) A program in HTML can be rendered and read by -

a. Web browser
b. Server
c. Interpreter
d. None of the above
Hide Answer Workspace

Answer: (a) Web browser

Explanation: HTML programs can be read and rendered by the


web browser. A web browser can support several web pages.

33) The tags in HTML are -

a. case-sensitive
b. in upper case
c. not case sensitive
d. in lowercase

Hide Answer Workspace

Answer: (c) not case sensitive

Explanation: HTML is a case-insensitive language, which means


we can use tags either in the upper-case or in lower-case. It is
recommended to write all tags in the lowercase for readability,
consistency, etc.

34) Which of the following is the root tag of the HTML document?

a. <body>
b. <head>
c. <title>
d. <html>

Hide Answer Workspace

Answer: (d) <html>


Explanation: The <html> tag represents the root of an HTML
document, hence also called as the root element. It is a container
of all elements (except !Doctype) such as <head>, <body> and
each element which appears in the HTML document.

35) In HTML5, which of the following tag is used to initialize the


document type?

a. <Doctype HTML>
b. <\Doctype html>
c. <Doctype>
d. <!DOCTYPE html>

Hide Answer Workspace

Answer: (d) <!DOCTYPE html>

Explanation: The <!DOCTYPE html> tag is used to inform the


browser about the version of HTML used in the document. It is
called as the document type declaration (DTD).

36) Which of the following tag is used to create a combo box (or
drop-down box)?

a. <list>
b. <select>
c. <input type = "dropdown">
d. <ul>

Hide Answer Workspace

Answer: (b) <select>

Explanation: HTML <select> tag is used to create a drop down


list with multiple options. The <option> element is nested within
the <select> tag to define options in a list.
1. HTML stands for ________
a) Hyper Text Markup Language
b) Holistick Technical Method Library
c) Hyper Tax Makes Line
d) None of the above

a) Hyper Text Markup Language

2. Who is the developer of HTML ?


a) Robert Cailliau
b) Tim Thompson
¢) Charles Darwin
d) Tim Berners-Lee

d) Tim Berners-Lee

3. HTML was first proposed in the year ?


a) 1985
b) 1990
c) 1995
d) 2000

4. HTML program is saved by using the ________ extension.

a) .ht
b) .hml
c) .html
d) None of the above

5. What type of language is HTML ?


a) Scripting Language
b) Markup Language
¢) Network Protocol
d) Programming Language

b) Markup Language

6. To create HTML page, you need ?


a) Web browser
b) Text editor
c) Both a & b
d) None of these

c) Both a & b

7. HTML uses_________ ?
a) Predefined tags
b) User-defined tags
c) Fixed tags defined by the language
d) Tags for links only

c) Fixed tags defined by the language

8. Choose the correct HTML tag to make the text bold –


a) <bd>
b) <a>
c) <bl>
d) <b>

d) <b>

9. Choose the correct HTML tag to make the text italic ?


a) <i>
b) <italic>
c) <it>
d) <il>
a) <i>

10. Which tag is used to define a line break ?


a) <Ir>
b) <\n>
c) <br>
d) <br>…</br>

c) <br>

11. What does the <br> tag add to your webpage?


a) Paragraph break
b) Long break ’
c) Line break
d) None of these

c) Line break

12. Which of the following is a paragraph tag in HTML ?


a) <p>
b) <b>
c) <pre>
d) None of the above

a) <p>

13. HTML is a subset of ________


a) SGMD
b) SGMH
c) SGML
d) None

c) SGML
14. All HTML tags are enclosed in what?
a) #and #
b) ?and!
¢) {and}
d) <and>

d) <and>

15. The BODY tag is usually used after ?


a) HTML tag
b) HEAD tag
c) TITLE tag
d) EM tag

b) HEAD tag

16. The first tag inside <TABLE> tag is ?


a) <TD>
b) <HEAD>
c) <CAPTION>
d) <TH>

c) <CAPTION>

17. Which of the following tag is used to insert a line-break in


HTML?
a) <a>
b) <b>
c) <br>
d) <pre>

c) <br>
18. Which character is used to represent the closing of a tag in
HTML ?
a) \
b) |
c) /
d) .

c) /

19. Which tag tells the browser where the page starts and stops. ?
a) <html>
b) <body>
c) <head>
d) <title>

a) <html>

20. In HTML, tags that include both on and off tags are called ?
a) document tag
b) comment tag
c) container tag
d) None of the above

c) container tag

21. Which color has the same amount of all the original colors ?
a) White, blue and gray
b) White, black and gray
c) Purple, green and blue
d) None of the above

22. A better way to establish a base URL is to use________the


element.
a) HEAD
b) BODY
c) BASE
d) None of the above

c) BASE

23. Full form of URL is ?


a) Uniform read locator
b) Uniform research locator
c) Uniform resource locator
d) United research locator

c) Uniform resource locator

24. Which program do you need to write HTML ?


a) HTML – development suite 4
b) A graphics program
c) Any text editor
d) All of these

c) Any text editor

25. Which of the following is the container for <tr>, <th>, and
<td> ?
a) <data>
b) <table>
c) <group>
d) none of these

b) <table>

26. Which of the following HTML attribute is used to define inline


styles ?
a) class
b) style
c) type
d) None of the above

b) style

27. What tag would you add to specify a font for your whole
page?
a) <defaultfont>
b) <targetfont>
c) <basefont>
d) <font>

a) <defaultfont>

28. Which HTML tag produces the biggest heading?


a) <h1>
b) <h2>
c) <h4>
d) <h6>

a) <h1>

29. The <BASE> tag is designed to appear only between ?


a) <BODY>
b) <HEAD>
c) <TITLE>
d) <PRE>

b) <HEAD>

30. When is the content of a table shown ?


a) Before the border loads
b) After the table is loaded
c) In pieces as it loads
d) None of the above
b) After the table is loaded

31. The default value of the BORDER attribute is ?


a) 1 pixel
b) 2 pixel
c) 3 pixel
d) None of the above

a) 1 pixel

32. All normal webpages consists of ________


a) Body and frameset
b) Top and bottom
c) Head and body
d) None of these

c) Head and body

33. To created a bulleted list, use ?


a) <ol>
b) <ul>
c) <il>
d) None

b) <ul>

34. What kind of list will <ol> tags create?


a) Numbered list
b) Unordered list
c) Bulleted list
d) None of the above

a) Numbered list
35. Increasing the cellpadding means ?
a) Increase the space between cells
b) Increase the softness of your site
c) Increase the distance between cell and content
d) All of the above

c) Increase the distance between cell and content

36. HTML tags are recognized by _________


a) <==>
b) <>
c) <!
d) None of the above

b) <>

37. Which tag adds a paragraph break after text ?


a) <HR>
b) <BR>
c) <P>
d) <PARAGRAPH>

c) <P>

38. The tag for title text for rows and columns is ?
a) <TH>
b) <TD>
c) <TR>
d) None of these

a) <TH>

39. How many characters can be written with 1 kilobyte ?

a) 1020
b) 1024
c) 1048
d) None of the above

b) 1024

40. The symbol used at the beginning of the HREF text is_________
a) #
b) &
0@
d) $

a) #

41. How can you make a list that list the items with numbers ?
a) <ul>
b) <list>
c) <ol>
d) None of the above

c) <ol>

42. Which tag can set the background color for your page ?
a) <font>
b) <body>
c) <head>
d) <title>

b) <body>

43. Which tag will add rows to your tables?


a) <tr>and </tr>
b) <th>and </th>
c) <td> and </td>
d) None of the above
a) <tr>and </tr>

44. Gif and jpg are the two main types of ?


a) Images
b) Animated effects
c) Videos
d) None of these

a) Images

45. Which of the following is underline tag?


a) <PRE>
b) <UL>
c) <U>
d) <HR>

Show Answer

c) <U>

46. Which of the following HTML tag is a special formatting tag ?


a) <p>
b) <b>
c) <pre>
d) None of the above

c) <pre>

47. Generally, there are


a) 4 headers in most HTML page
b) 5 headers in most HTML page
c) 6 headers in most HTML page
d) 7 headers in most HTML page

c) 6 headers in most HTML page


48. <P> is called ?
a) Head tag
b) Container tag
c) Paragraph tag
d) None of the above

c) Paragraph tag

49. The <HR> tag is used for ?

a) horizontal ruler
b) vertical ruler
c) new line text
d) new paragraph

a) horizontal ruler

50. Which HTML tag is used to define smaller text ?


a) <span>
b) <normal>
c) <smaller>
d) <small>

d) <small>

You might also like