COMP_2511_flashcards
What HTML element is used to define a border around an element?
CSS is used to define borders around HTML elements using the ‘border’ property.
How do you add an image to a webpage?
Use the ‘<img></img>’ tag and specify the source of the image with the ‘src’ attribute.
What is the purpose of the ‘‘<figure>” and ‘‘<figcaption>” elements in HTML?</figure>
’‘<figure>” is used to mark up a photo, diagram, or illustration, while ‘‘<figcaption>” provides a caption for the content of the ‘‘<figure>”.</figure></figure>
How does the “<picture>" element enhance responsive image delivery?</picture>
The ‘‘<picture>" element allows you to define multiple sources for an image, each suitable for different screen sizes or resolutions.</picture>
What is the best practice for sizing and placing images on a webpage?
Use CSS to control the size and placement of images, often with percentage values or media queries for responsiveness.
What semantic meaning do the “<header>” and “<footer>” elements provide?
“<header>” typically contains introductory content or navigational links, and “<footer>” contains information about the authorship and copyright of the document.
How can you change the text color and background color of an element?
Use the ‘color’ and ‘background-color’ properties in CSS to change the text and background colors, respectively.
What is semantic HTML and why is it important?
Semantic HTML uses elements like “<article>”, “<section>” and “<nav” to convey the meaning and structure of the web content, improving accessibility and SEO.