CSS <url> Data Type
Description
The <url>
CSS date type represents a reference to a file or file fragment. It is specified with the url() function. The <url>
data type is commonly used for images, but also for loading web fonts or defining filter or clipping path effects (in which case the identifier must link to a fragment within an SVG file).
Syntax
<url> = url( <string> <url-modifier>* )
Values
- <string>Represents a reference to a file or file fragment.
Example
<div></div>
div {
width: 300px;
height: 226px;
background-image: url('images/sunset.jpg');
margin: 10px;
}
Browser Support
Desktop | |||||
3 | 12 | 1 | 1 | 3.5 | 1 |
Tablets / Mobile | |||||
![]() |
|||||
1 | 18 | 4 | 14 | 1 | 1.0 |
Last updated by CSSPortal on: 9th December 2019