Start this hobby
Your first practical checklist
Buy or borrow
A computer and a browser. Any current browser works, and its built-in developer tools let you click an element and edit its styles live
First 30 minutes
Set up an HTML file and a CSS file, or open a playground, then make a single div with a width, height, colour and border-radius of 50% to turn it into a circle.
First week goal
Animate one part of your picture with keyframes, such as blinking eyes or a floating cloud, and check the result in a different browser.
Avoid this mistake
Using pixel sizes for everything makes the picture break at different screen sizes, so scale from a single container with consistent units.
Is this for me?
A quick fit check
Good signs
- You like both drawing and tinkering with code, and enjoy making a computer do something visual.
- You are happy to build a picture out of small pieces and do not mind fiddling with numbers to get shapes right.
- You want a creative way to practise HTML and CSS rather than only building web page layouts.
Think twice if
- Drawing in code is slow compared with a pencil or a drawing app, because you adjust numbers instead of making strokes.
- A complex picture can end up as hundreds of lines of CSS that are hard to read, and different browsers may render details slightly differently.
- CSS art is a niche, so it will not directly teach all the skills a web developer or illustrator needs.
Make CSS art easier
Use an online code playground with live preview so you can see each change at once, and start with a single shape such as a smiley face before you attempt a landscape.
First session
What to do in the first 30 minutes
Open a code playground or create index.html and style.css, and link them together.
Make a div, give it a width, height and background colour, then add border-radius: 50% to turn it into a circle.
Add two small circles for eyes and an oval for a mouth, positioned inside the larger circle with position: absolute.
Add a radial gradient for shading and a soft box-shadow, then use the browser's developer tools to tweak a value live.
The appeal · Digital practice
Why try CSS art?
CSS art is the practice of making illustrations and animations from HTML elements styled with CSS, with no image files. It is different from SVG art, which draws with vector paths, and from ordinary front-end development, where CSS styles a website rather than being the picture itself. You start by building simple shapes with rounded corners and gradients, then learn layering, clip-paths and shading, and finally move to full scenes and animations that run in the browser.
A creative way to learn CSS
Positioning, layering, gradients and transforms stick when you use them to make a picture you care about.
Instant visual feedback
Every change appears in the browser at once, so the cycle from idea to result is short.
Easy sharing
A finished piece is a few lines of code you can share on a playground or your own page for others to inspect and remix.
Keep it simple
What you need to begin
- A computer and a browserAny current browser works, and its built-in developer tools let you click an element and edit its styles live
- A text editor or an online code playgroundA free code editor or an online playground shows the picture as you type, which makes experimenting much quicker
- A reference imageChoose a simple picture, such as a flat-design icon or a cartoon animal, and break it into basic shapes before you start
- Basic HTML and CSS knowledgeYou need to know how to write an element, give it a size and colour and position it; a free beginner course covers this in a few evenings
The fundamentals
Four skills to build
Shapes with border-radius and clip-path
Rounded corners and clip-paths turn plain boxes into circles, leaves, triangles and curved outlines.
Layering and positioning
Using absolute positioning, z-index and nested containers lets you place and stack shapes exactly where they belong.
Gradients and shadows for depth
Linear and radial gradients and layered box-shadows add shading and highlights that make flat shapes look solid.
Custom properties and animation
CSS variables keep colours and sizes consistent, and keyframes bring a finished picture to life.
Four small steps
Your first week
- Set up an HTML file and a CSS file, or open a playground, then make a single div with a width, height, colour and border-radius of 50% to turn it into a circle.
- Build a simple face or moon from several circles and ovals, placing them with absolute positioning inside a container.
- Add depth with linear and radial gradients and soft box-shadows, then try clip-path to cut out a triangle or star.
- Animate one part of your picture with keyframes, such as blinking eyes or a floating cloud, and check the result in a different browser.
The longer path
How progress usually looks
For css art, a sustainable rhythm is an hour or so, two or three times a week, with a small piece finished in a few sessions. Move forward when the current step feels repeatable, not merely possible once.
First shapes
You can build a simple icon or face from circles, rectangles and rounded shapes with correct colours and positions.
Shaded illustrations
You use gradients, shadows and clip-path to make a more detailed picture, and you organise your code with variables.
Animated scenes
You make a scene with several layers and a few keyframe animations that stay tidy and run smoothly.
Large pieces and sharing
You create complex pieces, take part in community challenges and tidy your code so others can learn from it.
Progress markers
What improvement looks like
You can build a simple icon or face from circles, rectangles and rounded shapes with correct colours and positions.
You make a scene with several layers and a few keyframe animations that stay tidy and run smoothly.
You create complex pieces, take part in community challenges and tidy your code so others can learn from it.
Spend deliberately
A realistic cost plan
The headline starting range is Free, but access, borrowing and second-hand equipment can change that substantially.
Learn with other people
Community and safety
Finding your people
Most CSS artists share work on online playgrounds, forums and social platforms that run drawing challenges. Locally, front-end developer meetups and coding clubs are good places to find people who enjoy the craft.
Safety note
This is a low-risk hobby, so the care points are taking screen breaks and not using flashing or rapid strobe animations that could be uncomfortable for some viewers. Do not copy other people's work or commercial characters and present them as your own, and avoid putting personal details in public code.
Three common beginner mistakes
- Using pixel sizes for everything makes the picture break at different screen sizes, so scale from a single container with consistent units.
- Writing one giant block of CSS makes edits painful, so use custom properties for colours and comment each part of the picture.
- Piling on shadows and gradients without looking at the result makes it muddy, so add them one at a time and compare with your reference.
Good to know
One tip worth keeping
The common mistake is drawing everything with fixed pixel values that fall apart when the window changes, so put the whole picture in a container and use consistent units such as rem or percentages. Avoid fast flashing animations, and respect the prefers-reduced-motion setting for people who dislike movement.
Before you begin
Common questions
What is CSS art?+
It is making a picture or animation with HTML elements and CSS styles, with no image files. Shapes come from border-radius, gradients, clip-path and shadows.
Do I need to know how to draw?+
No. Basic shapes and a reference image are enough to start, and you improve your eye as you go.
How is CSS art different from SVG?+
SVG draws with vector paths and is usually easier for complex curves. CSS art builds the picture from page elements and styles, which is harder but a good way to learn CSS.
Is CSS art useful for getting a web development job?+
It builds real CSS skills such as positioning, layering and animation, and can show attention to detail, but a portfolio of working sites matters more.
Will my art look the same in every browser?+
Mostly, but small differences can appear, especially with newer features, so test in more than one browser and keep your code simple.