Of course! Here is an SVG of a stylized, elegant unicorn.
This design features a clean, modern look with flowing lines and a magical color gradient for the mane and tail.
Unicorn SVG Code
You can copy and paste this code into a text file and save it with a .svg extension (e.g., unicorn.svg). You can then open it in a web browser, an image editor like Inkscape, or embed it directly into an HTML file.
xml
<svg width="200" height="200" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" aria-labelledby="unicornTitle" role="img">
<title id="unicornTitle">A stylized unicorn head</title>
<defs>
<!-- A magical gradient for the mane and tail -->
<linearGradient id="magicGradient" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" style="stop-color:#FF69B4; stop-opacity:1" /> <!-- Hot Pink -->
<stop offset="50%" style="stop-color:#9370DB; stop-opacity:1" /> <!-- Medium Purple -->
<stop offset="100%" style="stop-color:#87CEEB; stop-opacity:1" /> <!-- Sky Blue -->
</linearGradient>
</defs>
<!-- Group for the main unicorn elements with a common stroke -->
<g stroke="#4B0082" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" fill="none">
<!-- Body and Head -->
<path d="M 150 180 C 120 160, 100 120, 110 80 C 115 60, 130 40, 145 30 L 140 20 L 120 45 C 100 40, 80 50, 70 70 C 60 90, 65 120, 90 140 L 95 180" fill="#FFFFFF"/>
<!-- Mane -->
<path d="M 115 75 C 90 60, 70 30, 80 15 M 105 85 C 80 80, 50 70, 40 50 M 95 130 C 60 125, 30 110, 20 80" fill="url(#magicGradient)" stroke="none"/>
<!-- Ear -->
<path d="M 95 55 C 105 45, 115 50, 115 60 Z" fill="#F5F5F5"/>
<!-- Horn -->
<g>
<path d="M 122 42 L 142 18 L 148 32 Z" fill="#F0F8FF"/>
<!-- Horn Spirals -->
<path d="M 130 38 L 138 28"/>
<path d="M 136 34 L 142 26"/>
</g>
<!-- Eye -->
<path d="M 125 70 A 5 5 0 0 1 135 70" stroke-width="2.5"/>
<!-- Eyelash -->
<path d="M 135 70 L 140 67" stroke-width="2"/>
<!-- Nostril -->
<path d="M 142 80 A 2 2 0 0 1 140 82" stroke-width="2"/>
</g>
</svg>
Preview
Here is a rendering of what the SVG code produces:
Breakdown of the Code:
<svg>: The main container for the vector graphic. viewBox="0 0 200 200" sets up a 200x200 coordinate system, making it easy to scale.
<defs>: This section defines elements that can be reused later.
<linearGradient>: Inside <defs>, this creates the beautiful pink-to-purple-to-blue gradient used for the mane. It's given an id="magicGradient" so it can be referenced.
<g>: This "group" tag bundles all the unicorn parts together. Applying styles like stroke, stroke-width, etc., to the group applies them to all shapes inside it, which is very efficient.
<path>: This is the most powerful shape-drawing tool in SVG.
The Body and Head path uses C (curve) and L (line) commands to draw the main profile.
The Mane is composed of three open paths to create a flowing effect, filled with the url(#magicGradient).
The Eye and Nostril are made with tiny A (arc) commands.
fill and stroke: These attributes control the inside color (fill) and the outline color (stroke) of the shapes. Notice how the mane's fill is set to the gradient's ID.