Popular Vendors
Demo practice questions for guest users.
Which HTML tag is used to define a section that is self-contained and reusable across a site, such as a blog post?
Which CSS property is used to create a grid layout system in a container?
display: grid; enables a two-dimensional layout system for web components. It allows content to be
placed in rows and columns with control over spacing and alignment. Unlike Flexbox, which is one
dimensional, Grid handles both axes efficiently. Grid is supported in all modern browsers and ideal for
complex layouts. Using CSS Grid improves flexibility and reduces the need for media queries.
Which of the following PHP features are essential for outputting data securely in HTML? (Choose two)
htmlspecialchars() escapes characters like < and > to prevent XSS attacks. strip_tags() removes all HTML tags from a string, increasing output safety. echo simply outputs data and does not sanitize it, which can be risky. include is for file inclusion, not for output handling. Using proper sanitization functions is a best practice in PHP web development.
Which of the following HTML attributes are valid and important for web accessibility? (Choose two)
The alt attribute provides alternative text for images, crucial for screen readers. aria-label enhances accessibility by providing labels for interactive elements. While src and target are valid HTML attributes, they don’t enhance accessibility directly. ARIA attributes like aria-label are part of the WAI-ARIA spec. Accessibility improves user experience for users with disabilities.
By default, a
its container. This behavior is suitable for structuring large content sections. Its display property can be
changed via CSS if needed. Understanding default behaviors is key in layout design.