Answer & Solution
<title> and <desc> elements to provide text descriptions or tooltips for screen readers.
<title> and <desc> elements to provide text descriptions or tooltips for screen readers.
Which of the following is a best practice for creating SVG icons and illustrations?
A). Use semantic markup and optimize for performance
B). Use inline styles for all elements and attributes
C). Ignore accessibility considerations
D). Create separate SVG files for each icon
What is the purpose of the <animate> element in SVG?
A). Create animations for SVG elements
B). Apply filters to SVG graphics
C). Define gradients for SVG elements
D). Create interactive SVG maps
How can you create a gradient fill in SVG?
A). Using the <linearGradient> or <radialGradient> elements
B). Using the <pattern> element
C). Applying CSS styles to SVG elements
D). Using the <filter> element for gradients
Which of the following is an advantage of using SVG?
A). Scalability
B). Limited color options
C). Large file sizes
D). Raster-based rendering
What is the purpose of the <defs> element in SVG?
A). Defines reusable elements and gradients
B). Specifies the document type
C). Declares the document's width and height
D). Specifies the SVG version
How can you add text to an SVG graphic?
A). Using the <text> element
B). Using the <shape> element
C). Using the <caption> element
D). Using the <description> element
What is the purpose of the stroke-linecap attribute in SVG?
A). Specifies the shape of the line endings
B). Determines the length of the dashed lines
C). Sets the color of the dashed lines
D). Defines the spacing between dashes
Which attribute is used to create animations in SVG?
A). <animate>
B). <motion>
C). <transform>
D). <transition>
What is the purpose of the stroke-width attribute in SVG?
A). Specifies the width of the stroke
B). Determines the opacity of the stroke
C). Sets the color of the stroke
D). Defines the curvature of the stroke
How can you create a dashed line in SVG?
A). Using the stroke-dasharray attribute
B). Using the stroke-dashoffset attribute
C). Applying a filter to the <line> element
D). Using the line-style property in CSS