We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

# <view>

A view is a defined way to view the image, like a zoom level or a detail view.

## Usage context

Categories None Any number of the following elements, in any order:Descriptive elements

## Attributes

### Specific attributes

• `viewBox`
• `preserveAspectRatio`
• `zoomAndPan`
• `viewTarget`

## Example

### SVG

```<svg width="600" height="200" viewBox="0 0 600 200"
xmlns="http://www.w3.org/2000/svg"
<defs>
<stop offset="0%" stop-color="#8cffa0" />
<stop offset="100%" stop-color="#8ca0ff" />
</defs>

<view id="halfSizeView" viewBox="0 0 1200 400"/>
<view id="normalSizeView" viewBox="0 0 600 200"/>
<view id="doubleSizeView" viewBox="0 0 300 100"/>

<text x="5" y="20" font-size="20">half size</text>
</a>
<text x="5" y="40" font-size="20">normal size</text>
</a>
<text x="5" y="60" font-size="20">double size</text>
</a>
</svg>```

## DOM Interface

This element implements the `SVGViewElement` interface.

## Specifications

Specification Status Comment
Scalable Vector Graphics (SVG) 2
The definition of '<view>' in that specification.
Candidate Recommendation
Scalable Vector Graphics (SVG) 1.1 (Second Edition)
The definition of '<view>' in that specification.
Recommendation Initial definition

## Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support Yes Yes15 No Yes ?
`preserveAspectRatio` ? ? ? ? ? ?
`viewBox` ? ? ? ? ? ?
`viewTarget` ? ? ? ? ? ?
`zoomAndPan` ? ? ? ? ? ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support ? Yes Yes15 ? ? ?
`preserveAspectRatio` ? ? ? ? ? ? ?
`viewBox` ? ? ? ? ? ? ?
`viewTarget` ? ? ? ? ? ? ?
`zoomAndPan` ? ? ? ? ? ? ?

Tags: