DOCTYPE Declaration
What is the primary purpose of the DOCTYPE declaration in an HTML document?
- To define the character encoding for the document.
- To specify the styling of the HTML elements.
- To specify the document type and HTML version being used.
- To link external style sheets to the document.
- To declare a java function
HTML5 Semantic Elements
Which HTML5 element is typically used to define the introductory section of a webpage, often containing logos and navigation?
- u003Cnavu003E
- u003Csectionu003E
- u003Cheaderu003E
- u003Cfooteru003E
- u003Carticleu003E
Meta Tag Attributes
Which attribute of the meta tag is used to provide a brief summary of the webpage's content for search engines?
- charset
- viewport
- content
- name
- http-equiv
ID vs. Class
In HTML, which attribute should be used to uniquely identify a single element on a page for styling or JavaScript manipulation?
- class
- style
- id
- name
- unique
Embedding Multimedia
Which HTML5 tag is used to embed a video file into a webpage?
- u003Caudiou003E
- u003Cimgu003E
- u003Cmediau003E
- u003Csourceu003E
- u003Cvideou003E
Accessibility Alt Text
What is the primary purpose of the 'alt' attribute in an image tag?
- To specify the image file name.
- To define the image's dimensions.
- To provide alternative text for visually impaired users.
- To set the image's alignment on the page.
- To improve page load speed
HTML Data Attributes
What is the purpose of HTML data attributes, denoted by 'data-*'?
- To define custom styles for an element.
- To link external JavaScript files.
- To store custom data on elements for web development.
- To specify the character encoding of the document.
- To create a database connection
Inline vs Block
Which of the following HTML elements is an example of a block-level element?
- u003Cspanu003E
- u003Cau003E
- u003Cdivu003E
- u003Cemu003E
- u003Cimgu003E
Script Loading
What is the primary difference between u003Cscript asyncu003E and u003Cscript deferu003E?
- async scripts are executed after the HTML is parsed, while defer scripts are executed before the HTML is parsed.
- async scripts execute in order, while defer scripts execute out of order.
- async scripts download without blocking HTML parsing and execute when available, while defer scripts download without blocking parsing and execute after HTML parsing is complete.
- async scripts are used for internal scripts, while defer scripts are used for external scripts.
- They are synonyms and interchangeable
Linking Documents
In the context of HTML links, what is the purpose of the 'rel' attribute?
- To specify the target window for the link.
- To define the styling of the link.
- To specify the relationship between the current document and the linked document.
- To set the title attribute for the link.
- To specify the size of the link.