0% found this document useful (0 votes)
32 views11 pages

HTML Practice Quiz

Uploaded by

dikshapoptani1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views11 pages

HTML Practice Quiz

Uploaded by

dikshapoptani1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

HTML PRACTICE QUIZ

(1) What does HTML stand for?


a. Hyper Text Markup Language
b. High Tech Markup Language
c. High Tool Markup Language
d. Hyperlinks and Text Markup Language
(2) Which attribute is used to specify an inline style for an HTML
element?
a. style
b. class
c. id
d. inline
(3) Which tag is used to define a table in HTML?
a. <table>
b. <tab>
c. <tr>
d. <td>
(4) What is the correct way to add a comment in HTML?
a. <!--This is a comment-->
b. // This is a comment //
c. /* This is a comment*/
d. **This is a comment**
(5) Which tag is used to define a header of a section or article in
HTML5?
a. <header>
b. <h1>
c. <head>
d. <section>
(6) What is the purpose of alt attribute in an HTML image?
a. it specifies the alternative text for an image
b. it specifies the alignment of an image
c. it specifies the size of an image
d. it specifies the link of an image
(7) What is the correct HTML tag for inserting a line break?
a. <break>
b. <lb>
c. <br>
d. <newline>
(8) Which tag is used to define an unordered list in HTML?
a. <ul>
b. <ol>
c. <li>
d. <list>
(9) What is the purpose of <head> tag in an HTML document?
a. it defines the main content of the document
b. it contains metadata about the document
c. it defines the header section of the document
d. it specifies the styles for a document
(10) What is the correct way to include an external JavaScript file in
an HTML document?
a. <script src=”script.js”>
b. <js src=”script.js>
c. <javascript src=”script.js”>
d. <script file=”script.js”>
(11) What does the HTML acronym DOCTYPE stand for?
a. Document Type Condition
b. Document Type Code
c. Document Type Compatibility
d. Document Type Declaration
(12) What is the correct way to create an unordered nested list in
HTML?
a. <ul><li>Item 1<ul><li>Subitem 1</li></ul></li></ul>
b. <ol><li>Item 1<ol><li>Subitem 1</li></ol></li></ol>
c. <ul><li> Item 1<li>Subitem 1</li></ul>
d. <ol><li> Item 1<li>Subitem 1</li></ol>
(13) What is the purpose of the <meta> tag in HTML?
a. it defines a hyperlink
b. it specifies the page title
c. it creates a paragraph
d. it provides metadata about an HTML document
(14) How do you set the viewport for responsive web design using the
<meta> tag?
a. <meta name="viewport" content="width=device-width, initial-
scale=1.0">
b. <meta name="viewport" content="width=1024, initial-scale=1.0">
c. <meta name="viewport" content="width=100%, initial-scale=1.0">
d. <meta name="viewport" content="width=auto, initial-scale=1.0">
(15) What is the purpose of the <div> tag in HTML?
a. it defines a hyperlink
b. it creates a line break
c. it specifies a division or section in an HTML document
d. it defines an ordered list
(16) How do you add a background image to an HTML element using
CSS?
a. background-image: url("image.jpg");
b. background: image.jpg;
c. image: background("image.jpg");
d. background-url: image.jpg;
(17) What is the purpose of the <span> tag in HTML?
a. it defines a section in a document
b. it specifies a line break
c. it groups inline elements for styling purposes
d. it creates a hyperlink
(18) Which attribute is used to specify the type of input in an HTML
form?
a. type
b. input-type
c. form-type
d. input
(19) Which attribute is used to specify the maximum number of
characters allowed in an input field?
a. size
b. maxlength
c. maxchars
d. limit
(20) What is the purpose of the HTML <footer> element?
a. it defines a section in a document
b. it specifies the main content of the document
c. it contains metadata about the document
d. it defines the footer section of the document
(21) Which tag is used to display an email address in HTML?
a. <email>
b. <mail>
c. <a>
d. <address>
(22) How do you create a dropdown/select menu in HTML?
a. <list>
b. <dropdown>
c. <select>
d. <menu>
(23) What is the purpose of the HTML <aside> element?
a. it defines additional information that is related to the main content
b. it specifies the main content of the document
c. it defines the footer section of the document
d. it contains metadata about the document
(24) Which tag is used to define a subscript text in HTML?
a. <sub>
b. <sup>
c. <small>
d. <italic>
(25) What is the purpose of the HTML <canvas> element?
a. it is used to display images
b. it is used to play audio files
c. it is used to draw graphics and animations
d. it is used to embed videos
(26) What is the purpose of the HTML <label> element?
a. it defines a section in a document
b. it specifies the main content of the document
c. it creates a hyperlink
d. it labels form elements
(27) What is the purpose of the HTML <blockquote> element?
a. it defines a section in a document
b. it specifies a block of quoted text
c. it creates a bulleted list
d. it contains metadata about the document
(28) How do you create an italicized text in HTML?
a. <italic>
b. <i>
c. <em>
d. <italicize>
(29) Which attribute is used to specify the alignment of content within
a table cell in HTML?
a. align
b. position
c. style
d. cell-align
(30) Which attribute is used to specify the size of an HTML input
field?
a. size
b. width
c. length
d. input-size
(31) What is the purpose of the HTML <iframe> element?
a. it is used to display images
b. it is used to play audio files
c. it is used to embed external web content within an HTML
document
d. it is used to create interactive forms
(32) How do you create a numbered list with a custom start value in
HTML?
a. <ol start="5">
b. <ol value="5">
c. <ol custom-start="5">
d. <ol number="5">
(33) Which tag is used to display computer code in HTML?
a. <code>
b. <pre>
c. <computer>
d. <text>
(34) What is the purpose of the HTML <figure> element?
a. it defines a section in a document
b. it specifies a figure or illustration in an HTML document
c. it creates a caption for an image or table
d. it contains metadata about the document
(35) Which attribute is used to specify the target destination for a
form submission in HTML?
a. action
b. method
c. target
d. submit-to
(36) How many sizes of headers are available in HTML?
a. 5
b. 1
c. 3
d. 6
(37) What is meant by empty tag in HTML?
a. there is no such concept of an empty tag in HTML
b. an empty tag does not require a closing tag
c. an empty tag cannot have any content within it
d. none of the above
(38) Which of the following is the correct syntax for using HTML?
a. <tagname style=”property: value”>
b. <tagname style=”property”>
c. <tagname style>
d. none of the above
(39) Which of the following properties is used to change the font of
text?
a. font-family
b. font-size
c. text-align
d. none of the above
(40) How are colours defined in HTML?
a. RGB values
b. HEX values
c. RGBA values
d. all of the above
(41) Which of the following is true about HTML tags?
a. case sensitive
b. case insensitive
c. uppercase
d. lowercase
(42) Which HTML tag is called root tag of HTML?
a. <html>
b. <head>
c. <title>
d. <body>
(43) What is the maximum value of any r,g,b value?
a. 250
b. 205
c. 255
d. 400
(44) What does the alpha value 0.0 represent?
a. fully opaque
b. fully transparent
c. 50% transparent
d. darkest shade
(45) Which of these is not a type of CSS?
a. Inline CSS
b. Internal CSS
c. Hyper CSS
d. Internal CSS
(46) What are the properties of block level elements?
a. it always starts on a new line
b. it always takes the full width available
c. it has a top and bottom margin
d. all of the above
(47) Which attribute is not essential under <iframe>?
a. frameborder
b. width
c. height
d. src
(48) Which of the following is an HTML specification used to add
more information to HTML tags?
a. Modify data
b. Mini data
c. Macro data
d. Micro data
(49) Which attribute specifies a unique alphanumeric identifier to be
associated with an element?
a. class
b. id
c. article
d. html
(50) Which element is used to get highlighted text in HTML5?

a. <u>

b. <mark>

c. <highlight>

d. <b>

You might also like