HTML(Hyper Text Markup Language) 1,2,3,4,5 Lessons For Beginners 1st Test (50+ MCQ'S)

Haroon Blogger
0

 

HTML(Hyper Text Markup Language) 1,2,3,4,5 Lessons For Beginners 1st Test (50+ MCQ'S)



Question 1: What does HTML stand for?
A) Hyper Text Markup Language
B) Hyperlinks and Text Markup Language
C) High Tech Markup Language
D) Home Tool Markup Language
Explanation: HTML stands for Hyper Text Markup Language.
Question 2: Which HTML tag is used to define the main content of a webpage?
A) <main>
B) <body>
C) <content>
D) <section>
Explanation: The <main> tag is used to define the main content of a webpage.
Question 3: Which attribute specifies the URL of the linked resource when using the <a> tag?
A) href
B) url
C) link
D) src
Explanation: The href attribute specifies the URL of the linked resource.
Question 4: What HTML element is used to create a form in HTML?
A) <form>
B) <input>
C) <button>
D) <select>
Explanation: The <form> tag is used to create a form in HTML.
Question 5: Which HTML tag is used to create a hyperlink?
A) <a>
B) <link>
C) <href>
D) <hyperlink>
Explanation: The <a> tag is used to create a hyperlink in HTML.
Question 6: Which attribute specifies where to open the linked document when using the <a> tag?
A) href
B) target
C) rel
D) link
Explanation: The target attribute specifies where to open the linked document.
Question 7: What is the correct way to represent a non-breaking space in HTML?
A) &nbsp;
B) &ns;
C) <nobr>
D) <non-break>
Explanation: &nbsp; is the correct way to represent a non-breaking space.
Question 8: What HTML element is used to define a table row?
A) <tr>
B) <td>
C) <table>
D) <row>
Explanation: The <tr> tag is used to define a table row.
Question 9: What is the purpose of the <footer> tag in HTML?
A) To define a section of navigation links
B) To provide closing content or additional information at the bottom of a webpage
C) To represent introductory content
D) To represent a self-contained piece of content
Explanation: The <footer> tag is used to provide closing content or additional information at the bottom of a webpage.
Question 10: What is the purpose of the alt attribute in the <img> tag?
A) It provides alternative text for the image
B) It specifies the alignment of the image
C) It defines the size of the image
D) It specifies the source of the image
Explanation: The alt attribute provides alternative text for the image.
Question 11: Which of the following is an example of inline elements in HTML?
A) <div>
B) <span>
C) <section>
D) <article>
Explanation: The <span> tag is an example of an inline element in HTML.
Question 12: Which HTML tag is used to define an unordered list?
A) <ul>
B) <ol>
C) <li>
D) <list>
Explanation: The <ul> tag is used to define an unordered list in HTML.
Question 13: Which attribute is used to specify the width of a table border in HTML?
A) width
B) style
C) border
D) size
Explanation: The border attribute is used to specify the width of a table border in HTML.
Question 14: What is the purpose of the href attribute in the <a> tag?
A) It specifies the URL of the linked resource
B) It defines the color of the link
C) It determines the font size of the link
D) It controls the visibility of the link
Explanation: The href attribute specifies the URL of the linked resource.
Question 15: Which HTML tag is used to create a horizontal line?
A) <hr>
B) <line>
C) <br>
D) <rule>
Explanation: The <hr> tag is used to create a horizontal line in HTML.
Question 16: Which attribute is used to specify the alternate text for an image in HTML?
A) alt
B) text
C) title
D) src
Explanation: The alt attribute is used to specify the alternate text for an image in HTML.
Question 17: Which of the following is the correct way to create a numbered list in HTML?
A) <ol><li>Item 1</li><li>Item 2</li></ol>
B) <ol><li>Item 1</li><li>Item 2</li></ol>
C) <ul><li>Item 1</li><li>Item 2</li></ul>
D) <ul><li>Item 1</li><li>Item 2</li></ul>
Explanation: The correct way to create a numbered list in HTML is with the <ol> tag.
Question 18: What is the correct way to add a background color to an HTML element?
A) bgcolor="red"
B) style="background-color: red;"
C) style="background: red;"
D) background-color: red;
Explanation: The correct way to add a background color to an HTML element is with the style attribute and the background property.
Question 19: Which tag is used to create a hyperlink in HTML?
A) <a>
B) <link>
C) <hyperlink>
D) <url>
Explanation: The <a> tag is used to create a hyperlink in HTML.
Question 20: Which of the following is the correct way to include external JavaScript code in an HTML document?
A) <script src="script.js"></script>
B) <script src="script.js" type="text/javascript"></script>
C) <script name="script.js"></script>
D) <script type="text/javascript">script.js</script>
Explanation: The correct way to include external JavaScript code is with the <script> tag and the src attribute.

Report Card

Total Questions Attempted: 0

Correct Answers: 0

Wrong Answers: 0

Percentage: 0%

Tags

Post a Comment

0Comments

Post a Comment (0)
To Top