DEV Community

jassica
jassica

Posted on

CSS IS WORTH LEARNING OR should I SWITCH TO SVG!

today i read about a language SVG through tweet , I have no knowledge about that bt in a tweet i read that css is only for fun ,nd worth learning is SVG!

I m confused , can someone plz help me is css nd svg is same or different ?

Oldest comments (9)

Collapse
 
zxcodes profile image
Mohammed Farmaan. • Edited

SVG and CSS are two completely different things. CSS is used to style the website and styling cannot be done with SVG. So you'll need CSS regardless. However, SVGs are used as scalable graphics for websites, such as backgrounds, images or small illustrations.

Collapse
 
dimplejha profile image
jassica

thanks for ur explanation ☺

Collapse
 
zxcodes profile image
Mohammed Farmaan.

Sure!😊

Collapse
 
akhilarjun profile image
Akhil Arjun

CSS is cascading style sheets and SVG is Scalable Vevtor Graphics.
SVGs are used in place of images/ backgrounds given your use case. But still you would need css to style those SVGs.
You would also need to style your CSS to style whole of your website. Without which it would be a plain black and white document.
So i wouldnt ever say CSS is only for fun πŸ˜…

Collapse
 
dimplejha profile image
jassica

thanks for ur explanation ☺
hihi i got it!

Collapse
 
cchana profile image
Charanjit Chana

It depends on what your goal is. If you want to build interfaces then CSS is going to be valuable. If you want to create illustrations, icons or something of that nature then go for SVG. Plenty of resources for both out there and there’s no harm in learning about both!

Collapse
 
dimplejha profile image
jassica

thanks for ur explanation ☺

Collapse
 
adam_cyclones profile image
Adam Crockett πŸŒ€

Let's put it simply.
HTML is an XML based thing and CSS is the only way to style it.
SVG is an XML based thing and CSS is the only way to style it.

People like to use CSS and HTML to achieve similar graphics and illustrations to an SVG but as you should know SVG being XML based can sit inside an XML based HTML document the two are compatible.

Use the right tools, scalable vector graphic for making graphics, and no don't learn it yet. Use illustrator or any similar tool to draw SVGs

Collapse
 
dimplejha profile image
jassica

thanks for ur explanation ☺
my dout is cleared
thanks