HTML5 inline SVG, html5 inline svg
HTML5 supports inline SVG.
What is SVG?
- SVG refers to Scalable Vector Graphics)
- SVG is used to define vector-Based Graphics for Networks
- SVG defines images in XML format
- There is no loss in the image quality of SVG images when they are enlarged or changed.
- SVG is the standard of the World Wide Web Alliance
SVG advantages
Compared with other image formats (such as JPEG and GIF), the advantages of using SVG are:
- SVG images can be created and modified in a text editor
- SVG images can be searched, indexed, scripted, or compressed
- SVG is scalable
- SVG images can be printed with high quality at any resolution
- SVG can be amplified without decreasing the image quality
Browser support
Internet Explorer 9 +, Firefox, Opera, Chrome, and Safari support inline SVG.
Embed SVG directly into HTML pages
In HTML5, you can directly embed SVG elements into HTML pages:
Instance
<! DOCTYPE html>
<Html>
<Body>
<Svg xmlns = "http://www.w3.org/2000/svg" version = "1.1" height = "190">
<Polygon points = "40,180 160,180"
Style = "fill: lime; stroke: purple; stroke-width: 5; fill-rule: evenodd;">
</Svg>
</Body>
</Html>
Try again»
Result:
Sorry, your browser does not support inline SVG.
Learning