Questions and Answers
For an HTML custom element, which lifecycle callback is called when the custom
element is first connected to the document's DOM? - answer connected Callback()
why is CSS considered "cascading" - answer Because styles can fall from one style
sheet to another, allowing multiple style rules to be applied to the same element.
Why is HTML 5 considered more suitable for modern web development compared to its
predecessors? - answer It provides native support for multimedia elements like video
and audio
represent the main headings - answer <h1>
Given the CSS rule body { background-color: #f3f3f3; }, what is background-color? -
answer property
If a web developer wants to specify the character set for their webpage, which of the
following tags is correctly used within the <head> section? - answer <meta
charset='UTF-8'>
What is the primary role of the <head> section in an HTML document? - answer To
hold meta-information, links to stylesheets, and other non-visible data
To attach a shadow root to a custom element, you'd use which method? - answer
Element. attachShadow()
Which of the following tools is commonly used to debug CSS issues in web browsers? -
answer Browser's Developer Tools
Which HTML tag encompasses the primary content of a webpage that's visible to the
user? - answer <body>
<ul> - answer An unordered list of elements
If a button, when activated, opens a navigation menu, which ARIA attribute can be used
to notify screen reader users of its expanded or collapsed state? - answer aria-
expanded
What is the most common metric to use when applying padding to tabled data? -
answer pixels