css url svg code example

Example 1: add svg to html

<!-- external svg -->
<img src="mySvgImage.svg" />

<!-- internal svg example -->
<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
  <rect width="100" height="100" x="50" y="50"/>
</svg>

Example 2: how to add an svg image to html

<body>

<img src="blabla.svg" alt="blabla_is_working">

</body>

Example 3: content url svg css

content: url(test.svg)

Unless SVGs are special, you should be able to treat them the same as you would an image: content: url(path/to/my.svg). That doesn't necessarily mean it would work with the jQuery UI tooltips library, though.

Tags:

Css Example