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

MCqsfinal

The document contains multiple-choice questions (MCQs) related to HTML concepts, covering topics from basic definitions to specific HTML tags and attributes. It includes questions about the purpose of various HTML elements, how to create forms, lists, and tables, as well as attributes used in HTML. The answers to the questions are provided, making it a comprehensive review tool for understanding HTML.

Uploaded by

nomandp77
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)
5 views

MCqsfinal

The document contains multiple-choice questions (MCQs) related to HTML concepts, covering topics from basic definitions to specific HTML tags and attributes. It includes questions about the purpose of various HTML elements, how to create forms, lists, and tables, as well as attributes used in HTML. The answers to the questions are provided, making it a comprehensive review tool for understanding HTML.

Uploaded by

nomandp77
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/ 14

Here are multiple-choice questions (MCQs) covering slides 1 to 78 from your "Introduction to

HTML" document:

1. What does HTML stand for?

a) Hyperlink Markup Language


b) Hyper Text Markup Language
c) High-Level Text Markup Language
d) Home Tool Markup Language

Answer: b) Hyper Text Markup Language

2. Which tool is required to create an HTML document?

a) Compiler
b) HTML Editor
c) Debugger
d) Assembler

Answer: b) HTML Editor

3. What does WYSIWYG stand for?

a) What You See Is What You Get


b) What You Select Is What You Get
c) What You Style Is What You Generate
d) What You Save Is What You Get

Answer: a) What You See Is What You Get

4. Which of the following is NOT an example of an HTML editor?

a) Dreamweaver
b) Notepad
c) Microsoft Word
d) Visual Studio Code

Answer: c) Microsoft Word


5. What is the function of a web browser in HTML?

a) To create an HTML document


b) To edit an HTML document
c) To compile an HTML document
d) To view an HTML document

Answer: d) To view an HTML document

6. How do you start an HTML document?

a) <html>
b) <head>
c) <body>
d) <doc>

Answer: a) <html>

7. What is the function of the <head> tag?

a) It contains the main content of the webpage


b) It contains metadata and the title of the document
c) It is used for creating headings
d) It defines the start of the document

Answer: b) It contains metadata and the title of the document

8. Which of the following is a container element in HTML?

a) <br>
b) <hr>
c) <p>
d) <img>

Answer: c) <p>
9. Which tag is used for inserting a horizontal line in HTML?

a) <line>
b) <hr>
c) <br>
d) <hline>

Answer: b) <hr>

10. What is the default alignment of a paragraph in HTML?

a) Left
b) Right
c) Center
d) Justified

Answer: a) Left

11. Which tag is used to define the largest heading in HTML?

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

Answer: b) <h1>

12. What does the <body> tag contain?

a) Metadata of the document


b) The main content of the webpage
c) The webpage title
d) External stylesheets

Answer: b) The main content of the webpage

13. Which tag is used to create a hyperlink in HTML?


a) <link>
b) <a>
c) <href>
d) <url>

Answer: b) <a>

14. What is the correct syntax for inserting an image in HTML?

a) <image src="image.jpg">
b) <img src="image.jpg">
c) <picture="image.jpg">
d) <insert image="image.jpg">

Answer: b) <img src="image.jpg">

15. Which attribute is used to provide alternative text for an image?

a) title
b) alt
c) description
d) text

Answer: b) alt

16. Which type of list is numbered in HTML?

a) Ordered list
b) Unordered list
c) Definition list
d) Bulleted list

Answer: a) Ordered list

17. How do you create an unordered list in HTML?


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

Answer: a) <ul>

18. Which tag is used to create a table in HTML?

a) <table>
b) <tab>
c) <td>
d) <th>

Answer: a) <table>

19. What is the purpose of the <tr> tag in a table?

a) Defines table rows


b) Defines table columns
c) Defines table data
d) Defines table borders

Answer: a) Defines table rows

20. How do you merge two columns in an HTML table?

a) rowspan
b) colspan
c) merge
d) span

Answer: b) colspan

21. What is the function of the <form> tag?


a) To insert images
b) To create input fields
c) To structure web pages
d) To define forms for user input

Answer: d) To define forms for user input

22. How do you create a text input field in an HTML form?

a) <input type="text">
b) <textbox>
c) <text>
d) <input box>

Answer: a) <input type="text">

23. What is the correct input type for a password field?

a) type="secure"
b) type="hidden"
c) type="password"
d) type="text"

Answer: c) type="password"

24. Which attribute is used to specify that an input field must be filled out?

a) required
b) validate
c) mandatory
d) fillout

Answer: a) required

25. What is the purpose of the <button> tag?


a) To submit a form
b) To create a clickable button
c) To create a password field
d) To insert an image

Answer: b) To create a clickable button

26. Which of the following input types allows a user to select multiple options?

a) Checkbox
b) Radio button
c) Textbox
d) Dropdown

Answer: a) Checkbox

27. How do you define a radio button in HTML?

a) <input type="checkbox">
b) <input type="radio">
c) <radio>
d) <option>

Answer: b) <input type="radio">

28. What is the default method for submitting form data?

a) GET
b) POST
c) SEND
d) RECEIVE

Answer: a) GET

29. Which tag is used to create a frame in HTML?

a) <frame>
b) <frameset>
c) <div>
d) <iframe>

Answer: d) <iframe>

30. What is the purpose of the <noframes> tag?

a) To hide frames
b) To provide content for browsers that do not support frames
c) To create multiple frames
d) To resize frames

Answer: b) To provide content for browsers that do not support frames

Here are more MCQs covering slides 1 to 78 from your "Introduction to HTML" document:

31. Which of the following is an empty element in HTML?

a) <p>
b) <div>
c) <br>
d) <span>

Answer: c) <br>

32. Which HTML tag is used to define metadata about the document?

a) <meta>
b) <link>
c) <data>
d) <script>

Answer: a) <meta>
33. What is the function of the <title> tag in HTML?

a) It defines the main heading of the page


b) It sets the webpage title in the browser tab
c) It inserts a title inside the body
d) It is used for creating subtitles

Answer: b) It sets the webpage title in the browser tab

34. What does the bgcolor attribute do in the <body> tag?

a) Changes the background image


b) Sets the background color of the webpage
c) Changes the font color
d) Controls the page alignment

Answer: b) Sets the background color of the webpage

35. How do you apply a background image to an HTML document?

a) <body background="image.jpg">
b) <background src="image.jpg">
c) <img background="image.jpg">
d) <bg image="image.jpg">

Answer: a) <body background="image.jpg">

36. Which of the following HTML elements is used for creating bold text?

a) <strong>
b) <b>
c) Both a and b
d) <bold>

Answer: c) Both a and b


37. Which HTML tag is used for italicizing text?

a) <i>
b) <italic>
c) <em>
d) Both a and c

Answer: d) Both a and c

38. How do you define a hyperlink that opens in a new tab?

a) <a href="link.html" newtab>


b) <a href="link.html" target="_blank">
c) <a href="link.html" open="new">
d) <a href="link.html" new="tab">

Answer: b) <a href="link.html" target="_blank">

39. Which attribute is used in an <img> tag to define the width of the image?

a) size
b) height
c) width
d) dimension

Answer: c) width

40. What is the correct syntax for creating an email link in HTML?

a) <a href="email:[email protected]">Email me</a>


b) <a email="[email protected]">Email me</a>
c) <a href="mailto:[email protected]">Email me</a>
d) <a mailto="[email protected]">Email me</a>

Answer: c) <a href="mailto:[email protected]">Email me</a>

41. How do you specify that a form field must be filled before submission?
a) validate="true"
b) required
c) mandatory
d) fill="true"

Answer: b) required

42. What does the <hr> tag do in HTML?

a) Inserts a horizontal line


b) Breaks the text into two paragraphs
c) Creates a new row in a table
d) Makes text bold

Answer: a) Inserts a horizontal line

43. Which of the following is NOT an HTML list type?

a) Ordered list
b) Unordered list
c) Definition list
d) Sequential list

Answer: d) Sequential list

44. How do you create a drop-down list in HTML?

a) <dropdown>
b) <select>
c) <list>
d) <options>

Answer: b) <select>

45. Which attribute is used in a form to group related input fields?


a) <fieldset>
b) <group>
c) <section>
d) <category>

Answer: a) <fieldset>

46. Which attribute allows a text field to have a pre-filled value?

a) default
b) value
c) placeholder
d) prefill

Answer: b) value

47. What is the function of the <caption> tag in a table?

a) It adds a title to the table


b) It merges table cells
c) It defines table data
d) It creates a table border

Answer: a) It adds a title to the table

48. What is the correct syntax for specifying the default selected option in a drop-
down list?

a) <option selected>Option 1</option>


b) <option default>Option 1</option>
c) <option active>Option 1</option>
d) <option choose>Option 1</option>

Answer: a) <option selected>Option 1</option>

49. What does the <iframe> tag do?


a) Creates a new tab
b) Embeds another HTML document inside a webpage
c) Creates a form field
d) Displays an image

Answer: b) Embeds another HTML document inside a webpage

50. What is the purpose of the <legend> tag?

a) It adds a label for a <fieldset>


b) It creates a list
c) It defines a caption for a table
d) It creates a hyperlink

Answer: a) It adds a label for a <fieldset>

51. What is the default font color of an HTML document?

a) Red
b) Black
c) Blue
d) Green

Answer: b) Black

52. What is the function of the placeholder attribute in an <input> tag?

a) It provides a hint inside the input field


b) It makes the input field required
c) It adds a label to the input field
d) It sets the maximum input length

Answer: a) It provides a hint inside the input field

53. Which HTML element is used to create a multi-line text input field?

a) <input type="text">
b) <textbox>
c) <textarea>
d) <textfield>

Answer: c) <textarea>

54. What does the <dl> tag represent?

a) A numbered list
b) A bulleted list
c) A definition list
d) A dropdown list

Answer: c) A definition list

55. How do you make a table cell span multiple rows?

a) rowspan
b) colspan
c) merge
d) spanning

Answer: a) rowspan

56. Which of the following is NOT a valid HTML form input type?

a) date
b) color
c) animation
d) range

Answer: c) animation

These MCQs continue covering the basic concepts from slides 1 to 78. Let me know if you need
even more! �

You might also like