Skip to content

Generative art

Introduction

SVG

SVG is an image format for vector graphics, meaning it can scale to any size without losing clarity. This allows you to create custom images directly using JavaScript or CSS on the web. As a result, SVG images are widely used in web development.

SVG can be embedded in HTML files or displayed in web via some approaches following:

  • if the type of HTML is XHTML and the declaim type is application/xhtml+xml, SVG can be embedded in XML directly.
  • use image
  • use Object tags
HTML
<Object data='image.svg' type='image/svg+xml'/>
  • use iframe
HTML
<iframe src='image.svg' type='image/svg+xml'/>

Reference

上次更新于: