1. What does HTML stand for?
Answer:
Explanation:
HTML stands for Hyper Text Markup Language. It is the standard markup language for documents designed to be displayed in a web browser.
2. Which HTML tag is used to define an internal style sheet?
Answer:
Explanation:
The <style> tag is used to define style information for a single HTML page, making it an internal stylesheet.
3. Which HTML element is used for the largest heading?
Answer:
Explanation:
<h1> is used for the largest heading in HTML.
4. How can you make a numbered list in HTML?
Answer:
Explanation:
An ordered list (<ol>) is used to create a numbered list in HTML.
5. Which attribute is used to provide an alternate text for an image, in case the image cannot be displayed?
Answer:
Explanation:
The alt attribute provides an alternate text for an image, if the image for some reason cannot be displayed.
6. Which element is used to define important text in HTML?
Answer:
Explanation:
The <strong> tag is used to define text with added importance in HTML, which is typically displayed as bold by default.
7. How do you create a hyperlink in HTML?
Answer:
Explanation:
The <a> tag with the href attribute is used to create hyperlinks in HTML.
8. Which tag is used to insert an image in an HTML page?
Answer:
Explanation:
The <img> tag, along with the src attribute specifying the path to the image file, is used to embed images in an HTML page.
9. What is the correct HTML tag for inserting a line break?
Answer:
Explanation:
The <br> tag is used in HTML to insert a line break or carriage return.
10. Which tag is used to define a table in HTML?
Answer:
Explanation:
The <table> tag is used to create a table in HTML.
11. Which attribute specifies a unique identifier for an HTML element?
Answer:
Explanation:
The id attribute is used to specify a unique id for an HTML element, which can be used for CSS styling and JavaScript manipulation.
12. What does the <meta> tag provide information about?
Answer:
Explanation:
The <meta> tag provides metadata about the HTML document, such as character set, page description, keywords, author of the document, and viewport settings.
13. Which HTML tag is used to display a horizontal rule?
Answer:
Explanation:
The <hr> tag is used to create a thematic break in an HTML page, commonly displayed as a horizontal rule.
14. Which tag is used to define a dropdown list in HTML?
Answer:
Explanation:
The <select> tag, in combination with <option> tags, is used to create a dropdown list in HTML.
15. What is the purpose of the <div> tag in HTML?
Answer:
Explanation:
The <div> tag is used to define a division or a section in an HTML document, often used as a container for other HTML elements for styling or layout purposes using CSS.
16. Which HTML tag is used to define a paragraph?
Answer:
Explanation:
The <p> tag is used for defining a paragraph in HTML. It automatically applies some margin before and after itself.
17. What is the correct HTML element for playing video files?
Answer:
Explanation:
The <video> element is used to embed video content in an HTML document.
18. Which of the following is NOT a valid HTML5 element?
Answer:
Explanation:
The <blink> element is not a part of HTML5; it was a non-standard element and is now obsolete.
19. Which HTML attribute is used to define inline styles?
Answer:
Explanation:
The style attribute is used to apply CSS styles directly to an HTML element, defining them inline.
20. How do you specify the character encoding in an HTML document?
Answer:
Explanation:
The <meta charset="UTF-8"> tag is used within the head section of the HTML document to specify the character encoding for the document.
21. What is the purpose of the <canvas> element in HTML5?
Answer:
Explanation:
The <canvas> element is used in HTML5 to draw graphics on a web page via scripting (usually JavaScript).
22. Which attribute is used to open a hyperlink in a new tab?
Answer:
Explanation:
The target="_blank" attribute in the <a> tag is used to open the linked document in a new tab or window.
23. Which HTML element is used for specifying a footer for a document or section?
Answer:
Explanation:
The <footer> element specifies a footer for a document or section, often containing information like authorship, copyright, and contact information.
24. What does the colspan attribute in a table cell specify in HTML?
Answer:
Explanation:
The colspan attribute in a <td> or <th> element specifies the number of columns that the cell should span.
25. Which tag is used to create a clickable checkbox in HTML?
Answer:
Explanation:
The <input type="checkbox"> tag is used to create a clickable checkbox in HTML.
26. Which HTML element is used to define a section in a document?
Answer:
Explanation:
The <section> tag is used to define a section in a document, typically with a thematic grouping of content and headings.
27. What is the purpose of the alt attribute for images in HTML?
Answer:
Explanation:
The alt attribute is used to describe the contents of an image file. It's important for accessibility and SEO.
28. Which element is used in HTML to create a form for user input?
Answer:
Explanation:
The <form> element is used to create an HTML form for user input which can contain various types of input elements like text fields, checkboxes, radio buttons, submit buttons, etc.
29. How can you make a list that lists the items with bullets?
Answer:
Explanation:
An unordered list (<ul>) is used to create a list of items marked with bullets.
30. Which tag is used to add a header in a table in HTML?
Answer:
Explanation:
The <th> (table header) element is used within a table to define header cells, which typically contain bold, centered text.
31. What is the correct HTML for making a text area?
Answer:
Explanation:
The <textarea> element is used to create a multi-line text input field, allowing users to input larger amounts of text.
32. Which HTML tag is used for displaying a list item with a disc bullet point?
Answer:
Explanation:
An unordered list (<ul>) with the style list-style-type: disc; will display list items with a disc bullet point.
33. In HTML5, which element is used to specify independent, self-contained content?
Answer:
Explanation:
The <article> element specifies independent, self-contained content in HTML5, such as a blog entry or news article.
34. Which HTML element is used to represent navigation links?
Answer:
Explanation:
The <nav> element is used to define a set of navigation links in HTML5.
35. Which HTML5 element is used for playing audio files?
Answer:
Explanation:
The <audio> element is used to embed sound content in documents. It can support multiple audio formats.
36. Which attribute is used to provide a tooltip for an element in HTML?
Answer:
Explanation:
The title attribute is used to provide additional information about an element, typically displayed as a tooltip when the mouse hovers over the element.
37. What does the <aside> element represent in an HTML5 document?
Answer:
Explanation:
The <aside> element in HTML5 is used for content that is indirectly related to the main content of the page, like a sidebar.
38. Which attribute is necessary to include in the <img> tag to make it valid HTML?
Answer:
Explanation:
The alt attribute is essential for image accessibility and SEO. It provides alternative text for the image if it cannot be displayed.
39. What is the role of the <link> element in HTML?
Answer:
Explanation:
The <link> element is used to link the current document to an external resource, often a stylesheet.
40. Which HTML tag is used to specify a header for a group of table rows?
Answer:
Explanation:
The <thead> element is used to group header content in a table, typically containing one or more <th> elements.