Scalable Vector Graphics (SVG) Interview Questions And Answers

Download SVG Interview Questions and Answers PDF

Refine your SVG interview skills with our 35 critical questions. These questions are specifically selected to challenge and enhance your knowledge in SVG. Perfect for all proficiency levels, they are key to your interview success. Download the free PDF to have all 35 questions at your fingertips. This resource is designed to boost your confidence and ensure you're interview-ready.

35 SVG Questions and Answers:

SVG Job Interview Questions Table of Contents:

SVG Job Interview Questions and Answers
SVG Job Interview Questions and Answers

1 :: What is SVG?

Scalable Vector Graphics (SVG) is a new graphics file format and Web development language based on XML. SVG enables Web developers and designers to create dynamically generated, high-quality graphics from real-time data with precise structural and visual control.
Read More

2 :: What is SVG and what is VML ?

SVG (Scalable Vector Graphics) is a format which is recomended by the W3C for the description of vector graphics, especially for the use in Web pages. In order to view a page with included SVG objects, you must install a plugin for your webbrowser. You can get one for free from http://www.adobe.com/svg/. There are plugins available for many webbrowsers.
Read More

3 :: What is SVG-VML-3D ?

SVG-VML-3D is a free JavaScript library which can be used to draw and manipulate 3D objects in html pages by using SVG or VML. The JavaScript code which has to be typed into the html page to define the Scene (3D Objects, Viewer Position, Light, ...) is the same for SVG and VML. If the browser is IE, then automatically VML will be used, otherwise SVG will be used.
Read More

4 :: What can we do with this SVG library?

One pic is more than 1000 words, so have a look at this examples by clicking on the pictures. Make sure, you use Internet Explorer or have installed a SVG plugin for your browser. For a first impression, how easy it is to display 3D objects using this library, have a look at the source code of the respective html files. The file svgvml3d.js is the core of the library and must always be included. If you want to use a 3D chart, then the file boundingbox.js must be included. Additionally, you can define your own classes for specific 3D objects. The objects, which are defined in the files platonic.js and colorbox3d.js are only used in their specific context. Have a look at those 2 files, to see how you can define your own objects for the use with this library.
Read More

5 :: Explore the possibilities of SVG?

Scalable Vector Graphics (SVG) is a text-based graphics language that describes images with vector shapes, text, and embedded raster graphics.

SVG files are compact and provide high-quality graphics on the Web, in print, and on resource-limited handled devices. In addition, SVG supports scripting and animation, so is ideal for interactive, data-driven, personalized graphics.

SVG is a royalty-free vendor-neutral open standard developed under the W3C (World Wide Web Consortium) Process.

Adobe has taken a leadership role in the development of the SVG specification and continues to ensure that its authoring tools are SVG compatible.
Read More

6 :: Does an SVG implementation ever do line-breaking of text?

It doesn't look like SVG will do any line-breaking. If you want line-breaking of text, then embed some XHTML or other CSS-formatted or XSL-formatted XML within <foreignobject>.
Read More

7 :: If a font contains kerning and ligature info, does an SVG renderer apply these transformations?

My best guess is that the answer will be 'yes' but I'm still doing my homework. I believe an SVG processor, just like a CSS processor, should take advantage of any intelligence built into a font.

Note that SVG will provide an 'altglyph' facility so that authoring products can precisely control which glyphs are used and thus override any automatic font features.
Read More

8 :: If yes, and the font is in Type1 format, and if the font is specified by download, how does the SVG renderer find the corresponding .afm (font metrics) file?

Don't think current W3C standards such as CSS address this issue directly and I'm not aware of any relevant de facto standards.

Adobe is aware of the desire to post Type1 Web fonts and is working through solutions. Stay tuned.
Read More

9 :: How does one specify a precise font in any other way than by downloading? In particular, how would an SVG document specify the difference between Adobe Times (in Type1 format, say), and Monotype Times (in TrueType format, say)?

You can provide a 'hint' about what type format a given font is, but I'm not sure that all implementations will do what you want and (for example) only use the Type1 font.

I think Web fonts are the way to go if you want to ensure that the correct font is used. System fonts have their place, too, but probably should be avoided if you have precise text needs.
Read More

10 :: Is there any way for the creator of an SVG document to specify text that will (a) be rendered with the precise metrics intended and (b) will render correctly on all conforming SVG implementations?

This was one of the requirements from the SVG Requirements document. Somehow or other this will be possible.
Read More

11 :: What are the predefined shapes in SVG?

SVG has some predefined shape elements that can be used and manipulated by developers:

* Rectangle <rect>
* Circle <circle>
* Ellipse <ellipse>
* Line <line>
* Polyline <polyline>
* Polygon <polygon>
* Path <path>
Read More

12 :: What are predefined shapes in SVG?

SVG has some predefined shape elements that can be used and manipulated by developers:

* Rectangle <rect>
* Circle <circle>
* Ellipse <ellipse>
* Line <line>
* Polyline <polyline>
* Polygon <polygon>
* Path <path>
Read More

13 :: What are available filters in SVG?

The available filters in SVG are:

* feBlend
* feColorMatrix
* feComponentTransfer
* feComposite
* feConvolveMatrix
* feDiffuseLighting
* feDisplacementMap
* feFlood
* feGaussianBlur
* feImage
* feMerge
* feMorphology
* feOffset
* feSpecularLighting
* feTile
* feTurbulence
* feDistantLight
* fePointLight
* feSpotLight
Read More

14 :: What are the SVG Gradients?

A gradient is a smooth transition from one color to another. In addition, several color transitions can be applied to the same element.

There are two main types of gradients in SVG:

* Linear Gradients
* Radial Gradients
Read More

15 :: Why to use SVG?

★ It is high-end 2D graphics using XML tags.
★ It uses XML as plain vanilla text.
★ SVG images are scalable.
★ CSS can be applied to SVG.
★ It is a W3C recommendation standard.
★ Exclusive technology to handle exclusively vector graphics.
Read More

16 :: List the advantages of SVG?

★ SVG files can be handled by various tools.
★ SVG files are smaller and more compressible that other formats like JPEG, GIF.
★ SVG images produce high quality prints irrespective of resolution.
★ SGV images are zoomable, without degradation.
★ Text can be selected in SVG images.
★ Text in SVG images is searchable.
Read More

17 :: List the example for SVG file?

Following code snippet is an example that draws a circle.
★ SVG code always starts with <svg> tag.
★ <?xml version="1.0" standalone="no"?>
★ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
★ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
★ <svg width="100%" height="100%" version="1.1"
★ xmlns="http://www.w3.org/2000/svg">
★ <circle cx="200" cy="100" r="50" stroke="blue" stroke-width="2" fill="yellow"/>
★ </svg>
Read More

18 :: How you can perform embed SVG in HTML?

★ SVG files are embedded into HTML documents by using <embed> , <object> and <iframe> tags.
★ The <embed> tag is supported for all major browsers.
★ The <embed> tag supports scripting.
★ Adobe SVG view recommends to use the EMBED tag while embedding in HTML page.
★ Note that the tag name is capitalized.

Following is an example for <embed> tag:
<embed src="rectangle.svg" height="100" width="300" type="image/svg+xml" pluginspage="http://www.adobe.com/svg/viewer/install/" >
Read More

19 :: How you can specify a border to a rectangle?

Following is the code snippet for drawing a rectangle:
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" version="1.1"
xmlns="http://www.w3.org/2000/svg">
<rect width="400" height="200" />
</svg>

The style attribute is specified in the <rect> tag to specify the border color. This is illustrated in the following code snippet:
<rect width="400" height="200" style="fill:rgb(0,0,255);stroke-width:1;
stroke:rgb(0,0,0)"/>
The property 'fill' defines the color to fill the rectangle.
The property 'stroke-width' defines the width of the border of the rectangle.
Read More

20 :: How to create a circle with the use of <circle> tag?

The <circle> tag is used for creating circles.
The tag requires the x and y coordinates as center point of the circle and radius of the circle.
Following is the example to draw a circle:

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" version="1.1"
xmlns="http://www.w3.org/2000/svg">
<circle cx="200" cy="100" r="50" stroke="black"
stroke-width="2" fill="blue"/>
</svg>

The circle's center point is at (200,100) coordinate and the radius is 50.
The 'stroke' attribute draws the border of the circle with 2 as width.
The circle is filled with blue, as the 'fill' attribute is assigned with color blue.
Read More

21 :: What are filters in SVG?

★ Filters in SVG are used to add special effects to shapes, images and text.
★ There are several parameters in SVG filters.
★ Certain filters are used for drawing objects.
★ Filter Tools allow Javascript / PHP to choose pictures on local disk and modify the images.
★ Certain filters are feColorMatrix, feComponentTransfer,feComposite,feGaussianBlur etc.
★ The filter primitives feSpecularLIghting and feDiffuseLighting are used with feComposite for creating lighted drawing.
★ The filter primitives feImage, feFlood and feOffset are used for creating input for other filters.
★ To create cloud patterns, feTurbulence with feColorMatrix is used.
★ The filters feGaussianBlur, feOffset, feSpecularLIghting and feComposite are used for creating 3D light effect.
Read More

22 :: What are Gradients in SVG?

Smooth transition from color to color is known as gradient.
★ Same element can be applied with several color transitions.
★ The types of gradients are:

1) Linear Gradients: Vertical, horizontal and angular gradients are known as Linear Gradients.
★ The tag <linearGradient> within <defs> tag is used to define linear gradients.
★ Linear Gradients effects from left to right or right to left or in diagonal directions of the object

2) Radial Gradients: The gradients with one color to another color is known as Radial Gradients.
★ Radial Gradients affects the middle part of the image.
Read More

23 :: Define VML?

★ Vector Markup Language supports vector graphic information markup.
★ The contents are composed of described paths using connected lines and curves.
★ VMS uses CSS Level 2 to determine the layout of the vector graphics.
★ The workflow for rendering VML is similar to that of HTML rendering.
★ The VML workflow generates the locations with related information for vector paths and related objects.
★ Followed by these operations, the bit map objects are rendered using the native operating system functionality.
Read More

24 :: Define VRML?

VRML - Virtual Reality Modeling Language to describe 3D image sequences.
★ A sequence of visual images into Web settings are build, with which a web user can interact with 3D scene.
★ VRML viewer should be plugged-in for a browser to view VRML file.
★ Blaxxun's CC Pro, Platinum's Cosmo Player, WebFx, WorldView and Fountain are the VRML viewers for MS Windows platform.
★ Whurlwind and Voyager are the VRML viewers for Apple's Mac.
Read More

25 :: List the different movie formats?

Following are some of the movie formats with file extensions and their description:
1) .3mm - 3D Movie Maker Movie
2) .aep - After Effects Project
3) .amv - Anime Music Video File
4) .asx - Microsoft ASF Redirector File
5) .avb - Avid Bin File
6) .gvp - Google Video Poiner
7) .lsf - Streaming Media Format
8) .m4e - MPEG-4 Video Format
9) .mjp - MJPEG Video File.
10) .rm - Real Media File
11) .siv - Sonic Imaging Video File
Read More