SVG Explained in 100 Seconds

Поділитися
Вставка
  • Опубліковано 17 жов 2024
  • What are Scalable Vector Graphics 🤏? How are vector images different than raster images? Learn the fundamentals of SVG in 100 seconds!
    Learn more about web design, SVG, and CSS in this tutorial: fireship.io/le...
    References:
    Star Wars Animation codepen.io/ner...
    Path Docs developer.mozi...
    #webdev #html #100SecondsOfCode
    Install the quiz app 🤓
    iOS itunes.apple.c...
    Android play.google.co...
    Upgrade to Fireship PRO at fireship.io/pro
    Use code lORhwXd2 for 25% off your first payment.
    My VS Code Theme
    Atom One Dark
    vscode-icons
    Fira Code Font

КОМЕНТАРІ • 605

  • @Fireship
    @Fireship  3 роки тому +987

    Stay tuned for "Beyond SVG" in a few days... You can do amazing things with SVG from a design perspective.

    • @softwarelivre2389
      @softwarelivre2389 3 роки тому +18

      Figma or Inkscape*
      Illustrator is dead.
      Thanks for the video though, one of the best channels on UA-cam for sure!!

    • @fibredeneige
      @fibredeneige 3 роки тому +4

      Can't wait, hope we'll see some animation examples

    • @klutch4198
      @klutch4198 3 роки тому

      OMFG

    • @DavidB-tw9tp
      @DavidB-tw9tp 3 роки тому +2

      Nice! I love the potential that SVG has

    • @theolavaux
      @theolavaux 3 роки тому

      😍😍😍

  • @brianevans4
    @brianevans4 3 роки тому +2095

    I had no idea it was even possible to manually draw bezier curves without the use of software like illustrator. This is definitely one i would have watched beyond 100 seconds for

    • @Fireship
      @Fireship  3 роки тому +267

      I mean I wouldn't recommend it for most things, but it's possible. Working on a long SVG vid now :)

    • @elementiro
      @elementiro 3 роки тому +43

      Obviously it is, why wouldn't it?
      It's just... difficult. Not syntax-wise but rather getting-the-right-numbers-wise.
      But if it can be done with software then it's obvious it can be written without it. Software can only use what's already defined in SVG format.

    • @MobiusCoin
      @MobiusCoin 3 роки тому +11

      Math baby!

    • @literallybiras
      @literallybiras 3 роки тому +6

      @@Fireship Please, SVG is like an old art for making great UIs, not good UIs, but the great ones with user interactivity and animations

    • @erkangorgulu6013
      @erkangorgulu6013 3 роки тому +2

      @@Fireship you knew it was coming

  • @alexhooper27
    @alexhooper27 3 роки тому +646

    I had no idea the inside of an svg file was just markup. This opens the door to so many possibilities

    • @SirusStarTV
      @SirusStarTV 3 роки тому +100

      Shocking for me was that Android .apk and IOS .ipa application files was just zip archives with different file extension name!

    • @IxMeTutorials
      @IxMeTutorials 3 роки тому +53

      @@SirusStarTV Even Microsoft Office files like .docx and .xlsx are just zip archives

    • @somerandomuser5155
      @somerandomuser5155 3 роки тому +6

      The more you know!

    • @alexhooper27
      @alexhooper27 3 роки тому +9

      @@SirusStarTV whaaaaaaaa

    • @SirusStarTV
      @SirusStarTV 3 роки тому +5

      @@IxMeTutorials interesting

  • @jdubina6078
    @jdubina6078 3 роки тому +496

    Coolest things I’ve learned about svg’s is that you can make changes to them with JavaScript, like a prop in react and change a color or text on the svg. Additionally you can put mathematical equations in svgs. SVGs are underrated IMO.

    • @shahnawazazam
      @shahnawazazam 3 роки тому +2

      Damn never knew about that

    • @jdubina6078
      @jdubina6078 3 роки тому +6

      @@shahnawazazam yep, if you were to be building an e-commerce site with customization or personalization products, svgs would be the way to go. Would easily give your customer a visual of their selections.

    • @ko-Daegu
      @ko-Daegu 3 роки тому +1

      @@jdubina6078 but what well you use svg in this example??
      also is it that kinda ling and redundant easier to use an img

    • @jdubina6078
      @jdubina6078 3 роки тому +13

      @@ko-Daegu you could use this this if you had an e-commerce store where you sell personalized or customized items. Like an item where someone could put their name on a product. When they type their name in an input field, you could render and svg to show them what it would look like. This image could then be saved.

    • @brndto
      @brndto 3 роки тому +4

      ​@@ko-Daegu not sure what you mean by 'kinda ling' but img tags can be quite annoying when trying to deal with the new web vitals, each tag to our image domain (not cdn) is around 120ms with 20ms of that being the actual image download and the rest being pre-download communication to the server hosting the image
      tbh anything that can be vectorized should be imo if it can be kept under 2kb gzipped in svg format

  • @DesignByFaizi
    @DesignByFaizi 3 роки тому +384

    You are on fire lately.

  • @coach10001
    @coach10001 3 роки тому +43

    I love all the "fashionable" 100 seconds. But these little gems is what I personally appreciate most. Thank you.

  • @furball_vixie
    @furball_vixie 3 роки тому +749

    Today I learned: SVG isnt a binary format but rather a format thats actually simmiliar to HTML

    • @abdallahmohammed9978
      @abdallahmohammed9978 3 роки тому +39

      It is HTML code
      you can literary write svg tags in your html

    • @092_deepak_kumar3
      @092_deepak_kumar3 3 роки тому +55

      @@abdallahmohammed9978 it's based on XML

    • @igorswies5913
      @igorswies5913 3 роки тому +40

      @@abdallahmohammed9978 it's XML to be specific because it's more strict, you have to close every tag

    • @abdallahmohammed9978
      @abdallahmohammed9978 3 роки тому +8

      @@igorswies5913 The Path tags can be closed like this

    • @igorswies5913
      @igorswies5913 3 роки тому +3

      @@abdallahmohammed9978 that's what I meant

  • @stevend2748
    @stevend2748 7 місяців тому

    0:33 - Code
    1:17 -
    d = draw
    M = Move absolute
    m = move relative to the last point
    l = line that actually draws

  • @mohammadoulabi4212
    @mohammadoulabi4212 3 роки тому +187

    I have been doing frontend for 5 years, I started building open sources and contributing to existing ones, worked on huge projects
    Drawn svgs and animations using figma and css
    This 100 seconds explained svgs better than any other resources I've read lol
    Manually writing SVGs been one of the most difficult topics for me
    Thanks a lot fireship you're awesome

    • @DexieTheSheep
      @DexieTheSheep 2 роки тому +7

      figma balls

    • @billygreggory7899
      @billygreggory7899 Рік тому +2

      @@DexieTheSheep Lmao

    • @V.Z.69
      @V.Z.69 10 місяців тому

      If you have a good handle on math and trigonometry, even geometry, you can get down. But I would say for x/y location and shapes, not really as an Artist. As an artist, it's moot. I just explained to a person: An artist can learn HTML and CSS, but a mathematician won't become an artist. I created a drawing tool, using JavaScript that draws circles, arcs, shadows, pinpoints arcLengths and projections and line of sight over a curve and so on; even scales it with a slider. But there is nothing about it that is what an artist can use. It's pure math and navigation and plotting points with said math and trig and geometry.

  • @brucewayne2480
    @brucewayne2480 3 роки тому +22

    Bézier is a Genius , He invented those curves controlled by some points for renault

  • @bilaleyrik8680
    @bilaleyrik8680 3 роки тому +18

    Hey , I hope one day I can see this channel have 10m subs because you honestly deserve it with the perfect , concise , informative , entertaining and engaging content you create on a weekly basis. You are a legend , thank you so much for the content. Great Video !

  • @pemessh
    @pemessh 3 роки тому +3

    This was a much needed video for me.
    I have been using SVG for quite a while now and I had no idea that these things were this simple.

  • @LopissoErgando-f4x
    @LopissoErgando-f4x 9 місяців тому +1

    short, detailed and straight to the point, thanks

  • @Digital963
    @Digital963 3 роки тому +1

    Best shortest svg video I’ve ever seen. And believe me I spent a whole day once researching SVG

  • @kuroikenshi9217
    @kuroikenshi9217 3 роки тому +87

    Cool!
    Next: HTML5 Canvas API in 100 seconds🔥

    • @ludologian
      @ludologian 3 роки тому +1

      Omg yes !

    • @DavidDeCorso
      @DavidDeCorso 3 роки тому +1

      Mozilla has pretty good docs and tutorials for the canvas that helped me a lot.

    • @SirusStarTV
      @SirusStarTV 3 роки тому +1

      I thought it would be too short for HTML canvas API but you can pretty much describe how to draw shapes and clear background in 100 seconds

    • @DavidDeCorso
      @DavidDeCorso 3 роки тому

      @@SirusStarTV you could probably do simple animation as well

    • @Aouraghmouhamed
      @Aouraghmouhamed 3 роки тому

      +1

  • @md.fazlulkarim8847
    @md.fazlulkarim8847 3 роки тому +2

    Great man... You can't even imagine how creatively 100 seconds of series helped me. And possibly every one of us .✨

  • @blueguy5588
    @blueguy5588 3 роки тому +1

    The best "casual watching" programming channel. Magnificent work.

  • @TheGitGuild
    @TheGitGuild 3 роки тому +6

    I noticed that I was blindly using svg files for years. I've enlightened :)

  • @muazahmed4106
    @muazahmed4106 3 роки тому +109

    SSL/TLS in 100 Seconds

    •  3 роки тому

      this

  • @micah2936
    @micah2936 2 роки тому

    This is a perfect pace for somebody who already has knowledge of coding
    Thank you

  • @ivanangelov8825
    @ivanangelov8825 2 роки тому +1

    Totally worth the 100 seconds! Short enough and within the same time crystal clear, amazing!

  • @SolomFoz
    @SolomFoz 2 роки тому

    god this saved me from watching hundreds of minutes of videos and tutorials to just know these basic things! thank you so much

  • @crashingflamingo3028
    @crashingflamingo3028 3 роки тому +11

    I didn't actually know that SVG works like turtle graphics. Thanks for an awesome and concise explanation :)

  • @brianzhamilton
    @brianzhamilton 3 роки тому +2

    This just gave me the answers I need to work on a project that’s been in the back of my mind! So helpful! Thanks!

  • @venkateshprasad7488
    @venkateshprasad7488 3 роки тому +2

    This was amazing .. I always ignored svg part, when ever I had came across it...now seems like it's the time, I will start doing some designing stuffs as well...Thanks. .It was really helpful !!!

  • @jannes6666
    @jannes6666 3 роки тому +19

    I love those shorts!

    • @karlnassar8646
      @karlnassar8646 3 роки тому +1

      Those arent the shorts but still this series is so good

  • @Qwetzxl
    @Qwetzxl 3 роки тому +1

    This series is so cool that i end up watching so many it goes from 100 seconds to 10000000000000000

  • @danyalijaz
    @danyalijaz 3 роки тому +1

    I have never used PNGs for my web applications. It's crazy how high quality your website becomes with SVGs.

  • @dennisbarzanoff9025
    @dennisbarzanoff9025 3 роки тому +1

    omg literally what i needed at this very moment. i was just trying to wrap my head around why one of my icons did not work properly and boom.. fireship makes a video about it

  • @mediocreman6323
    @mediocreman6323 3 роки тому +1

    WOW! Amazing video! I think I will use what I learned in _only 100 seconds_ to create small icons in websites that can be colored like text just by the use of color-definitions via CSS. One of the most useful videos I have ever watched on UA-cam!

  • @Psychopatz
    @Psychopatz 3 роки тому +1

    Woahh, you made my day a lot productive knowing that SVG's inner workings. Thanks a lot sir!

  • @manavshah7033
    @manavshah7033 3 роки тому +5

    This is so cool and informative.
    I always wondered what was the long code in the path attribute when I inspected a website!
    Thank you 🔥

  • @akC012
    @akC012 3 роки тому

    something that i was ignorant to study for long period assuming it is complex; but...as usual, u just spoonfed my brain and its asking for more! thnx man

  • @nrnoble
    @nrnoble 2 роки тому

    Just stumbled on this channel and ended up subscribing because I like the 100 seconds concept of high-quality content.

  • @ScottLee64
    @ScottLee64 3 роки тому +1

    With fewer than a 600K subscribers, this channel is greatly undervalued. Thanks for all the content!

    • @albedesigns
      @albedesigns Рік тому

      Now they have over 2 million! I love the way they explain everything so simply so it's easy to understand. Too bad UA-cam wasn't around when I started learning vanilla HTML & CSS.

  • @nikyabodigital
    @nikyabodigital 3 роки тому +1

    It's really daunting to stare at svg codes but this 100 seconds literally made it easier

  • @sinpi314
    @sinpi314 3 роки тому +1

    You can use Inkscape, which is an excellent, open source and very professional vector graphics software
    It’s what I use and I absolutely love it!

  • @imthiaz09
    @imthiaz09 3 роки тому

    The only channel that gives you what you need right when you need it.

  • @Dloc47
    @Dloc47 3 роки тому

    Wow I got basic clear understanding of SVG in 100 seconds. Wow! Thank you!

  • @timothymccully795
    @timothymccully795 3 роки тому

    I wish I would had seen this half an hour ago. This is the first video that's made sense to me. Thank you!

  • @bsky1998
    @bsky1998 3 роки тому +21

    Me before watching this video: **looks at SVG I'm trying to make with intense confusion** 😵
    Me after watching this video: SO THAT'S WHAT THOSE NUMBERS AND LETTERS MEAN 🧠

  • @p32929
    @p32929 3 роки тому +3

    whoa!! I was always scared of drawing SVG by myself. Never thought it would be that simple :O

  • @kingbiibii
    @kingbiibii 3 роки тому +1

    I love your post. You have the best explanation for all the ideas of web and programming that were never clear to me, Thanks @Fireship

  • @LegendBegins
    @LegendBegins 9 місяців тому

    It also opens the door to tons of security issues. Love SVGs.

  • @kevinshah_tv
    @kevinshah_tv 3 роки тому +1

    Holy hell. I genuinely did not know it awas this simple. Always saw random X Y M L characters and blindly just copy pasted it in myHTML. God bless you Sir. This was extra awesome than your other, already awesome videos.

  • @salmankazi5308
    @salmankazi5308 3 роки тому

    Thanks A Lot...Was Unable TO Understand The Difference Between PNG and SVG from a Long time

  • @tamsucophieuchungkhoan4241
    @tamsucophieuchungkhoan4241 2 роки тому

    couldn't believe I spent 4 hours before finding you, thank god

  • @lautarolesniewicz2884
    @lautarolesniewicz2884 Рік тому

    Great video, helped me more than the other 10 minutes videos explaining SVG xd

  • @ThiagoVieira91
    @ThiagoVieira91 3 роки тому

    MIND = 🤯
    Always had a hard time to grasp the basics of SVG. You explained it like no one. Waiting eagerly fo the Beyond 💯s

  • @blinkpromotion
    @blinkpromotion 4 місяці тому

    This channel is making shorts before shorts became a thing in youtube!!!

  • @spb1179
    @spb1179 3 роки тому

    Litterally the best explanation ever for svgs

  • @jannesvanquaillie9151
    @jannesvanquaillie9151 3 роки тому

    My mind was blown, watching this video
    I didn't expect this, happy surprise!

  • @LanceThorpe
    @LanceThorpe 3 роки тому

    Holy these 100second vids are so good

  • @mridulbarman027
    @mridulbarman027 3 роки тому

    Your channel is the best every channel for programmers. Love u a lot bro ❣️

  • @stevesmith0624
    @stevesmith0624 11 місяців тому

    I find these so useful lol, would like in depth courses or tutorials from this page, cuz if they can provide this much information in 100 seconds, well

  • @FunnyHaHa420
    @FunnyHaHa420 3 роки тому +1

    It reminds me of Fortran. For those of you under 50, Fortran was an old programming language that stopped being used for the most part after C+ came out. but back in the mid 80's it was still viable.

  • @David-nk7pv
    @David-nk7pv 3 роки тому

    This content is fantastic. We need more teachers like you

  • @SANDEEPSandeep-pr2xi
    @SANDEEPSandeep-pr2xi Рік тому

    U explain very good in short time, that's very good

  • @anandt2003
    @anandt2003 3 роки тому

    More such shorts please.. this is 🔥🔥

  • @diablomertn
    @diablomertn 3 роки тому

    All these years ... How did i miss the opportunities i can create with illustrator ... Thank you for this !

  • @rohil3023
    @rohil3023 3 роки тому

    This makes svgs much more easier to understand

  • @TvsChaitanya
    @TvsChaitanya 3 роки тому +1

    Much needed one for me. Thank you so much for this simple easiest video ❤️

  • @SnjP3RDrjv3R
    @SnjP3RDrjv3R Рік тому

    This is really helpful. At my Job I got a Project to visualize data in svgs.

  • @SeanClarkeMusic
    @SeanClarkeMusic 3 роки тому

    I'm wondering 🧐could we crowd-fund Fireship to produce "rapid, concise, and meaningful dev docs" for ALL web related langs/platforms/libs? Seriously, I get such a lot from these short vids. It's a power punch of just the right amount of info to dive in and get going with things. Much appreciated ♥️

  • @treyquattro
    @treyquattro 3 роки тому

    another brilliant episode that is keeping my list of stuff-I-should-know-but-don't topped up!

  • @apurvthakur7
    @apurvthakur7 Рік тому

    Amazing, I am using SVGs for many years without knowing how actually they are created.

  • @nullpointer3860
    @nullpointer3860 2 роки тому

    New subscriber, your videos are simply as cool as they are entertaining and educational.

  • @gh0stcloud499
    @gh0stcloud499 3 роки тому

    That’s so cool! Hope you do a bigger vid on them!

  • @hollowbug2443
    @hollowbug2443 3 роки тому +2

    A mention of "currentColor" would have been helpful as well in order to be able to dynamically overwrite the svg color from outside

  • @web_masud
    @web_masud 3 роки тому

    that is reallly awesome focus on svg icon

  • @Isickincorporated
    @Isickincorporated 4 дні тому

    ik im late to commenting on this vid but tysm, now i inderstand the svg bits in html when im making webscraper code. Now im able to figure out how to pull the "most viewed" bar from youtube videos in my next project :D

  • @triminhtruong251
    @triminhtruong251 2 роки тому

    I am really appreciate the series. I wish if your team can release a 'ADA in 100 seconds' since I do love that language

  • @blablablabla29382
    @blablablabla29382 3 роки тому

    didn't know that we could manually make svg, ty !

  • @fxmtoeclipse
    @fxmtoeclipse 3 роки тому

    This has to be your best video.

  • @andriilukianenko8106
    @andriilukianenko8106 3 роки тому

    I want to see a longer version fo this brilliant video.

  • @Norsilca
    @Norsilca 10 місяців тому

    It always seemed strange to me that in such a structured xml-based language, the tag just uses this weird string with its own mini language. The list of commands could easily have been child tags inside the instead. I wonder why they decided to go this route.

  • @DruSerkes
    @DruSerkes 3 роки тому

    Learned more about SVG in 2 minutes here than I've been able to pickup anywhere else

  • @kocraft137
    @kocraft137 3 роки тому +45

    ASCII in 100 seconds

    • @TheAndre2131
      @TheAndre2131 3 роки тому +8

      ASCII can be explained in 10 seconds, perhaps he can do all character encoding in 100 seconds?

    • @SirusStarTV
      @SirusStarTV 3 роки тому +3

      @@TheAndre2131 Unicode and Unicode Transfer formats are big topic that couldn't be explained under 100 seconds

    • @TheAndre2131
      @TheAndre2131 3 роки тому +2

      @@SirusStarTV The man has managed to cover Kubernetes, Nginx, etc in 100 seconds. Surely he could do a brief high-level overview of how they work in 100 seconds?

  • @kennethlarsen3907
    @kennethlarsen3907 2 роки тому

    Holy Smokes. Thank you for making it so simple!

  • @saikrishnasunkam4344
    @saikrishnasunkam4344 2 роки тому

    The "useful content per second" metric of this video is insane

  • @developerpranav
    @developerpranav 3 роки тому

    hey man, love your amazing knowledgeable videos. one of my favourite channels of all time

  • @sinanyaman2007
    @sinanyaman2007 3 роки тому

    I had no idea that I would be interested in learning svg lol you are a legend

  • @WagnerDeQueiroz
    @WagnerDeQueiroz 3 роки тому

    magnific work! Now I can understand Curves!

  • @all_watched_over
    @all_watched_over 3 роки тому +1

    one 'gotcha' in SVG transforms like rotate is that by default the elements use the origin of the SVG rather than the origin of the element. so in your example of rotate being applied to the element, it would rotate using the top left of the SVG as a transform origin. that behavior would be unexpected, because it is not like normal HTML elements. One way to fix this is to apply transform-box: fill-box; to the SVG element. that way it would rotate as expected (and like your example)

  • @oneoflokis
    @oneoflokis 2 роки тому

    You've basically explained it to me! Thank you!! 🙂👍 (Basically, it creates images which are good to be enlarged to any size.) 🙂

  • @neveriodev350
    @neveriodev350 Рік тому

    Amazingly explained for a 100 sec video wow

  • @lukor-tech
    @lukor-tech 3 роки тому +22

    Ayyy perfect! Just in time for an afk meal :D

  • @sfathahila4799
    @sfathahila4799 10 місяців тому

    thankyou you saved my life

  • @lukehatcher98
    @lukehatcher98 3 роки тому

    I learned more in the first 20 seconds than I have seeing and hearing about “svgs” over the last 2 years

  • @staywithmesenpai
    @staywithmesenpai 3 роки тому +1

    I always hated svg as they were annoying to convert to but now that it was explained to me, it is actually pretty cool

  • @umarhasnain7369
    @umarhasnain7369 3 роки тому

    I learned total SVG from this video. Thanks. Maybe I can work with it now

  • @islamibrahim8121
    @islamibrahim8121 2 роки тому

    I can say, I've watched this before and coming back to this after hitting my head on the wall with svgs, I realised that this has a lot of info.
    One thing being the shapes.
    No more css circle hack from now on.
    SVG

  • @shateq
    @shateq 3 роки тому +2

    I didn't know that I needed that

  • @fugeratube1334
    @fugeratube1334 2 роки тому

    really well explained in 100 min thanks

  • @anmolrajx
    @anmolrajx 3 роки тому

    Well explained i just love your content brother. Lots of love from 🇮🇳

  • @pauloprado1688
    @pauloprado1688 3 роки тому

    What a nice and fine way of explaining it. Really good

  • @etiennedaher
    @etiennedaher Рік тому

    Straight to the point awesome!

  • @joaocesarlima7339
    @joaocesarlima7339 3 роки тому

    I learned more about SVG by watching this video than by watching some full courses on the subject.

  • @felipecarl1415
    @felipecarl1415 2 роки тому

    loved this video, learned really fast!!

  • @psenej
    @psenej 3 роки тому

    i understood in 100 seconds thanks brooooo