HTML5 inline SVG, html5 inline svg

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.