How To Make Website DARK MODE | Dark Theme Website Design Using HTML, CSS & JS

Поделиться
HTML-код
  • Опубликовано: 7 сен 2024
  • Learn How To Make Dark Mode On Website | Dark Mode, Dark Theme Website Design Using HTML CSS and JavaScript Step by Step
    ❤️ SUBSCRIBE: goo.gl/tTFmPb
    Watch This video to make website design:
    👉 • How To Make A Website ...
    Download Icons:
    drive.google.c...
    In this video we will create light mode and dark mode switching option on website using HTML CSS and JavaScript. We will use CSS variables to change theme color from one place. after that we will add JavaScript that will change the theme color by clicking on icon, it will also change the icon from moon icon to the sun icon. after watching this video you can convert any website into dark mode or night mode or dark theme website.
    Part 2: • How To Make Dark Mode ...
    ----------------------------------------------------------
    ❤️ Complete website Using HTML and CSS
    ✔️ 8 Complete website step by step
    ✔️ Source Code Download
    ✔️ 76 Lectures, 12 Hours Video
    ✔️ Course Completion certificate
    👉 easytutorialsp...
    -------------------------------------
    Recommended Videos:
    HTML and CSS For Beginners
    ► • Complete HTML & CSS Co...
    Login and Register with Database connectivity:
    ► • How To Make Login & Re...
    Make Contact form using HTML CSS PHP
    ► • Create Working Contact...
    Make Form With Password hide and display toggle:
    ► • How To Make Login Form...
    Make login and registration form with Transition:
    ► • How To Make Login & Re...
    Make a full website using HTML and CSS
    ► • How To Make Website Us...
    -------------------------------------
    Best hosting up to 60% off (coupon- EASYTUTORIALS)
    👉 easytutorialsp...
    Affordable hosting up to 91% (coupon- EASYTUTORIALS)
    👉 easytutorialsp...
    My recommended tools and tutorials
    👉 easytutorialsp...
    -------------------------------------
    ◼️ Source code link is shared in community post for all my coding videos exclusively for channel members (only channel members can see)
    Join Channel Membership:
    ► / @greatstackdev
    -------------------------------------
    image credit:
    pexels.com/
    www.pexels.com/
    -------------------------------------
    Like - Follow & Subscribe us:
    ◼️ RUclips: goo.gl/tTFmPb
    ◼️ Facebook: goo.gl/qv7tEQ
    ◼️ Twitter: / itsavinashkr
    ◼️ Instagram: / iamavinashkr

Комментарии • 567

  • @dublUayaychtee
    @dublUayaychtee 3 года назад +142

    This video makes the light and dark mode toggle so much easier. Thank you!

  • @ussardor
    @ussardor 3 года назад +93

    Thank you so much. I'm teaching my students with the help of your videos. We are writing your projects in class.

    • @GreatStackDev
      @GreatStackDev  3 года назад +15

      Wonderful!

    • @webwizard4219
      @webwizard4219 3 года назад +40

      What kind of teacher are you?😂😂😂

    • @jaskaran_lol
      @jaskaran_lol 3 года назад +2

      @@webwizard4219 😂

    • @anything-anything700
      @anything-anything700 3 года назад +3

      @@webwizard4219 😂😂

    • @GreatStackDev
      @GreatStackDev  3 года назад +5

      Must watch this video to save the dark theme on browser to keep dark theme active on page reload: ruclips.net/video/2j_kBqpFK-g/видео.html

  • @avion_
    @avion_ 3 года назад +34

    I actually like this type of explanatory videos, rather than the trendy fast forwarded ones. Good job sir. Have a nice day ahead.

  • @jgnmas
    @jgnmas 2 года назад +19

    I am so glad I was recommended this by YT.
    I love little details that make things better. I’ll be super happy to offer this on my site! Thank you so much!

  • @programmernotes4365
    @programmernotes4365 3 года назад +21

    THIS IS AMAZING, I'M SO HAPPY RIGHT NOW 😍😅

  • @the6250
    @the6250 2 года назад

    I see how it is RUclips. You show me this ad everyday and I ignore it, but now you're actually recommending me this video.

  • @Sumit-pm4uj
    @Sumit-pm4uj 2 года назад +5

    I watched it today, My all doubts about dark mode are clear, your explanation are awesome 👏❤️

  • @user-iv9mx7md8q
    @user-iv9mx7md8q 5 месяцев назад +1

    i am learning the art of building frontends which a user will continue seeing
    your channel is like a jackpot for me
    you are amazing brother

  • @abhijiths148
    @abhijiths148 3 года назад +9

    I am wondering why he is not using inspect element 😂😁
    Helpful video 🤘

  • @muhammadhasnain682
    @muhammadhasnain682 2 года назад +4

    bruh i feel sad why you should not approach 1 M subscriber love from Pakistan

  • @rajithagirijadevi5050
    @rajithagirijadevi5050 2 года назад +4

    I had to create toggle between dark and light mode this week and this video made it real easy to implement. Thanks a lot !!

  • @sergeialekseenko3545
    @sergeialekseenko3545 3 года назад +19

    So easy but so much helpful,thanks a lot man!

    • @GreatStackDev
      @GreatStackDev  3 года назад +2

      Glad it helped! Please must watch this video to save the dark theme on browser to keep dark theme active on page reload: ruclips.net/video/2j_kBqpFK-g/видео.html

  • @yetix_bo
    @yetix_bo 3 года назад +4

    thanks for everything, greetings from La Paz Bolivia ... South America .... Go ahead and thank you for sharing all your knowledge. God bless you.

    • @GreatStackDev
      @GreatStackDev  3 года назад

      Thanks to you. must watch this video to save the dark theme on browser to keep dark theme active on page reload: ruclips.net/video/2j_kBqpFK-g/видео.html

  • @Bobert6B05
    @Bobert6B05 Месяц назад

    Hey bro thanks , i used to do them one by one adding a class to each one until some guy on discord told me to to do a handler or whatever at the top and i found your video to do it.

  • @reivaxerubiza2204
    @reivaxerubiza2204 2 года назад +1

    Nice, found out what I was doing wrong. I put the script at the tag when instead I should be putting the script at the tag. Thanks for the video, very informative.

    • @samsonogunrinde
      @samsonogunrinde 8 месяцев назад

      You are not wrong

    • @samsonogunrinde
      @samsonogunrinde 8 месяцев назад

      It’s better one get his or herself familiar with putting the script in the head other than in the body

    • @samsonogunrinde
      @samsonogunrinde 8 месяцев назад

      It’s is ok to put in the body for small projects like this one and rather better in the head tag for bigger projects

  • @miguelgiraldoduke9711
    @miguelgiraldoduke9711 3 года назад +4

    You have improved your channel a lot, you were very helpful, thank you !!

  • @dlgsh
    @dlgsh 3 года назад +13

    Hey I really liked the video! ❤☀️💚🇮🇳

  • @chandupaart2005
    @chandupaart2005 3 года назад +2

    Tutorial is so clear and with your sound it is easier to understand...
    Thank you

    • @GreatStackDev
      @GreatStackDev  3 года назад

      Thank you Niroo. glad you like this dark mode website video.

  • @Rs-nh7zx
    @Rs-nh7zx 2 года назад +3

    Please make multi page website with this, that’d be amazing!

  • @avimishra8263
    @avimishra8263 3 года назад +1

    Bhai kya video banaya hai ......... agr hindi nhi aati toh english mai bhi lele yaar ............... Damn awesome video saved a lot of time .. Thanks and keep making such awesome videos.

    • @GreatStackDev
      @GreatStackDev  3 года назад +1

      Thank you Avi bhai, Iska 2nd part jrur dekhne, dark mode ko browser me save karne ke liye: ruclips.net/video/2j_kBqpFK-g/видео.html

  • @manashroy9469
    @manashroy9469 Год назад +1

    Thank you so much❤ Now I have completed my project. ❤❤❤❤

  • @amaanmajeed4068
    @amaanmajeed4068 2 года назад

    Mannnnn.. love you soo much. I tried a lot of other methods but this one was the one which worked for me.. coming from someone who is a newbie at HTML and CSS. 💓

  • @chaituvsh5574
    @chaituvsh5574 3 года назад +1

    This is the easiest and the best explanation. You are a champion.

  • @migoypro3370
    @migoypro3370 2 года назад

    this channel deservrd a million views and subcriber its very useful and amazing tutorial easy to learn

  • @TURKISTONIM2
    @TURKISTONIM2 3 года назад +1

    Honestly respect for you thanks bro you solve my problem ✔️✔️✔️👍👍👍👍👍👍

  • @user-cj8vd3iw8h
    @user-cj8vd3iw8h 3 года назад +2

    Good, and clear video! Thanks!
    I am writing a comment to increase the ranking!

    • @GreatStackDev
      @GreatStackDev  3 года назад

      Thank you so much, must watch this video to save the dark theme on browser to keep dark theme active on page reload: ruclips.net/video/2j_kBqpFK-g/видео.html

  • @prasad4718
    @prasad4718 Год назад +2

    I was just not get that how you changed entire web text color when click event occurs.
    By the way thank you for this project.

    • @GreatStackDev
      @GreatStackDev  Год назад +1

      that click event added a new class name "dark-theme" in the and this dark theme class contains new color codes for the website

    • @prasad4718
      @prasad4718 Год назад

      @@GreatStackDev Thank you perfectly got it!

  • @lucenzowalker1362
    @lucenzowalker1362 2 года назад +1

    Thank you friend! You explained this soo good. Now working on my website project for school. Thanks!

  • @fateen4229
    @fateen4229 3 года назад

    This is the best RUclips channel to learn website development.

    • @GreatStackDev
      @GreatStackDev  3 года назад +1

      Thank you, glad you like my channel

    • @fateen4229
      @fateen4229 3 года назад +1

      @@GreatStackDev your videos helped me a lot. God bless you

    • @GreatStackDev
      @GreatStackDev  3 года назад +2

      must watch this video to save the dark theme on browser to keep dark theme active on page reload: ruclips.net/video/2j_kBqpFK-g/видео.html

    • @fateen4229
      @fateen4229 3 года назад

      @@GreatStackDev much needed video 👍

  • @zeinab_3107
    @zeinab_3107 2 года назад

    I think toturuals with a bunch of js in one video get us tired
    This new serues of your amazing and useful short js toturials in projects are juste the best on youtube

  • @dadaflicker5004
    @dadaflicker5004 2 года назад

    This method is new for me, but it's easier and makes the code less lengthy.
    Before this I use to individually change every color on website twice..😅
    You earned yourself a new subscriber👍

  • @mohammedanwar1165
    @mohammedanwar1165 3 года назад +1

    Thanks a lot my dear teacher ...
    Ur student from yemen💚💚💚

    • @GreatStackDev
      @GreatStackDev  3 года назад +1

      Thanks, Please check it part 2 also, to same dark mode in browser: ruclips.net/video/2j_kBqpFK-g/видео.html

  • @alihakimoglu1189
    @alihakimoglu1189 3 года назад +12

    Thank you, man!!!
    You are a life savior
    Really appreciate your content

    • @GreatStackDev
      @GreatStackDev  3 года назад +1

      Hi Ali, Must watch this video, to save the dark theme on browser to keep dark theme active on page reload: ruclips.net/video/2j_kBqpFK-g/видео.html

  • @balapramothc.m.
    @balapramothc.m. 3 года назад +3

    Superb bro but pls teach us how to connect all the webpages. That is we have link the menu bar with anchor know how do we connect dark mood for those page . What is by clicking on the moon button in home page it should reflect to other pages also how do we do that . please explain bro

    • @GreatStackDev
      @GreatStackDev  3 года назад +1

      Hi Bala bro, you can check my other video of multi page website design to connect all pages in navigation menu, this video concept is just to teach dark mode design. Here you can watch the multiple page website design: ruclips.net/video/oYRda7UtuhA/видео.html

  • @SuperMakhter
    @SuperMakhter 4 месяца назад

    SIR YOU ARE GREAT YOUR LEARNING STYLE WAS SOOOOOOOOOOOOOOO EASY

  • @an802adam
    @an802adam 2 года назад

    Dood, this is impressively simple. I'm going to see if this works with my client's wix site right now. Thank you!

    • @an802adam
      @an802adam 2 года назад

      i wish Wix allowed us to declare css elements so we could use this method. Sadly, they don't. Wix creates unique element IDs and Classes on each reload so I'm going to have to use another method. Thank you very much for this great video.

  • @artnardone
    @artnardone 2 года назад

    That's great , a lot of happy people thank you,& thumbs up. I am a dummy and don't know what your talking about beside the language barrier. The problem with you tech geeks is you can not communicate. with somebody 50 years old and up.

  • @SafalKumarRajbanshiMotu
    @SafalKumarRajbanshiMotu 3 месяца назад +1

    Just Amazing..... Thank you Bro.

    • @GreatStackDev
      @GreatStackDev  3 месяца назад

      Glad you liked it. Thanks for your comment. 😊

  • @_Lifer_Gaming
    @_Lifer_Gaming 2 года назад

    Your a beast bro, not just changing the background color and text color but the buttons as well

  • @atharva4093
    @atharva4093 3 года назад +7

    I want to make a website which will store data of user by just login form
    Means i will add users name and password manually, i will upload thier data, and they will able to download it
    Can you make a video on it ??
    If you want more details , i will mail you, give me your email🙂

  • @jobaer23.
    @jobaer23. Год назад +1

    Dark theme I use. But if i refresh the page, it comes back to the previous theme. What is the solution?

  • @youtubekarma007
    @youtubekarma007 3 года назад +1

    theme didn't changed ! Any problem here ?
    var icon = document.getElementById("icon");
    icon.onclick = function(){
    document.body.classList.toogle("dark-theme");
    if(document.body.classList.contains("dark-theme")){
    icon.src="img/sun.png";
    }
    else{
    icon.src="img/moon.png";
    }
    }

  • @rmjones15
    @rmjones15 3 года назад +7

    What about when the user refreshes or navigates to another page? Won't it switch back to light mode?

    • @moontiscom
      @moontiscom 3 года назад

      Use localStorage

    • @GreatStackDev
      @GreatStackDev  3 года назад

      Hi Reece, Please watch this video to save the dark theme on browser to keep dark theme active on page reload: ruclips.net/video/2j_kBqpFK-g/видео.html

    • @rmjones15
      @rmjones15 3 года назад

      @@GreatStackDev Thank you so much!

  • @sparker3498
    @sparker3498 Год назад +1

    you just save a brother thank so much

  • @viliam9334
    @viliam9334 Год назад +1

    I wrote everything you wrote in the script, but it doesn't color like you and I can't :(
    var icon = document.getElementById("icon");
    icon.onclick = funcion(){
    document.body.classList.toggle("dark-theme");

  • @jyotikajaichand1982
    @jyotikajaichand1982 Год назад +1

    sir my moon icon is not coming as i m not able to downkoad the image...when i click on the image u provided it shows copy file name, on pasting it in img src, the image does not show....what do i do? plz help, i m a beginner.

    • @BaljeetSingh-nh8vp
      @BaljeetSingh-nh8vp 4 месяца назад

      Just checking can you still make webpages without tutorials?

  • @logichunga74
    @logichunga74 Год назад

    Awesome u r helping billions of programmers

  • @mahdi_c200
    @mahdi_c200 Год назад +1

    thank you , your solution is so helpful

  • @MrWebDesignerAnas
    @MrWebDesignerAnas 3 года назад +2

    this is what I have been looking for...
    thank you so much sir.

  • @abdssamad5246
    @abdssamad5246 3 года назад +1

    You are a legend and your tutorials are amazing❤❤

  • @anilreddy8475
    @anilreddy8475 2 года назад +1

    Thankyou so so much man. Great tutorial keet it up..

  • @leondo6867
    @leondo6867 2 года назад +6

    Hello, I love your video on changing the web page from light to dark. I was wondering how can I make the theme as default as if I switch from light to dark then go to another page but I want it to remain as dark theme

    • @fonkar3310
      @fonkar3310 7 месяцев назад

      have you found out the answer?

  • @AmitKumar-cp1oz
    @AmitKumar-cp1oz 10 дней назад +1

    Thanks GreatStack for a Great Video!

    • @GreatStackDev
      @GreatStackDev  10 дней назад

      Glad you enjoyed it Amit! Thank you 😊

  • @shaheenislam2088
    @shaheenislam2088 3 года назад +2

    bro please you give us (bootstrap 5 & javascript) basic to advance tutorial........??
    your tutorial on of the best tutorial

  • @funnyanimalworld7579
    @funnyanimalworld7579 2 года назад +1

    Add a function on button to flip collours of every element you want color changed.

  • @An-yh2bl
    @An-yh2bl Год назад +1

    It´s fantastic and your explanations are also really good! :)

  • @laxmanaraoarasavilli2919
    @laxmanaraoarasavilli2919 2 года назад

    Thank you for clarifying my doubt...................

  • @franklinmayoyo
    @franklinmayoyo 2 года назад

    I l oved how clean your website and code is. thanks for the nice explanation. You got a new sub

  • @Ghostfancoder
    @Ghostfancoder 2 года назад

    Bro thank you for explaining things so easily. I am glad i found your channel

  • @zerlynmagpantay3189
    @zerlynmagpantay3189 6 месяцев назад

    Hi. I'm trying to implement dark mode but when I click the button it would only work for the current page, then when i go to a different page it would go back to the default light mode unless I click on the dark button again. How do I make it apply to the whole website? Thanks!

  • @dedse3
    @dedse3 2 года назад +3

    Awesome video, thanks a lot! You turned this feature into something really easy to do when I was struggling trying to make it!

  • @mahmudulhasanjoy5466
    @mahmudulhasanjoy5466 3 года назад

    Superb Ninja Simple technic used dark-them. Thank you so much.

  • @Dan-ez4xv
    @Dan-ez4xv 2 года назад

    Very helpful for my competition ♥️🤘 Thanks.

  • @zeinab_3107
    @zeinab_3107 2 года назад

    Very very helpful
    Thanks a bunch
    Plz plz make more of these amazing short videoes on java script
    God bless ya❤

  • @joshua_226
    @joshua_226 Год назад

    This was such a great video. It made it a hundred times easier

  • @bharatmalhotra1880
    @bharatmalhotra1880 7 месяцев назад

    Bro is casually flexing on the smooth css animation by hovering over the lady in the start 😭😭

  • @emmanuelbaffoeappiah-ofori
    @emmanuelbaffoeappiah-ofori Год назад +1

    hi, I wanted to use an icon vector instead of an image, how do I do this?

  • @shubhammali2109
    @shubhammali2109 Год назад

    superb sir thank you so much greatfull....plz keep making such videos

  • @radhenandhika9700
    @radhenandhika9700 2 года назад

    A lot of thank you from me sir...good job 😎 U have a great video and i love it...thanks 😄

  • @iannn2008
    @iannn2008 2 года назад

    this is the best video tutorial that i have ever seen, good job!

    • @GreatStackDev
      @GreatStackDev  2 года назад

      glad you like this dark mode website tutorial

  • @GeniusFromPakistan
    @GeniusFromPakistan 3 года назад

    There is a much simpler way add this style to your body
    body *:not(img){
    filter: invert(1)
    }
    You can add anything to :not that you dont want to invert also you can do it with a class aswell ....

  • @_abhisthetics_
    @_abhisthetics_ Год назад

    bro when i refresh the page it turns light mode and when moving to another linked page the mode is different what to do to keep same mode through all pages when clicked....?

  • @ovskihouse5270
    @ovskihouse5270 2 года назад

    That's awesome for bignrs to learn from... Inspire

  • @sairajrajput4857
    @sairajrajput4857 Год назад

    It works.
    thank you sir for such amazing videos.

  • @sahirulwebofficial7375
    @sahirulwebofficial7375 2 года назад

    The video is very nice. The concept is cleared. Thanks

  • @Ki21Mo
    @Ki21Mo 3 года назад +4

    I really appreciate your tutorials. Is it possible to make the buttons and nav bar glow? If yes, how does one go about doing it? Thanks!

    • @GreatStackDev
      @GreatStackDev  3 года назад +2

      Yes you can make it by using box-shadow shown in this video: ruclips.net/video/UlSWnzaCI38/видео.html

    • @Ki21Mo
      @Ki21Mo 3 года назад

      @@GreatStackDev OMG this will totally work!!!! Thank you

  • @chome4
    @chome4 2 года назад +1

    How could you animate the change from light to dark and back again? I can't get '--transition-delay' to work!

  • @Kamalesh_R
    @Kamalesh_R 11 месяцев назад

    Bro thanks for this video ❤ , it's so easy to understand, Thankyou

  • @ramalsrougi
    @ramalsrougi 3 года назад

    You're the best.. I SWEAR 🙌😍❤❤❤

  • @engidabirhanu8871
    @engidabirhanu8871 3 года назад +1

    It is so amazing I like it so much
    and you are so kind

  • @rang.luthfi
    @rang.luthfi 3 года назад +2

    thanks this video helpful for me, because i'm made dark theme the code is too long and not easy to read. i dont know there has alternative code is like this.

    • @GreatStackDev
      @GreatStackDev  3 года назад

      Glad it helped! Please watch this video to save the dark theme on browser to keep dark theme active on page reload: ruclips.net/video/2j_kBqpFK-g/видео.html

  • @dilipkumargudipati6512
    @dilipkumargudipati6512 10 месяцев назад

    Great content Please keep uploading these kind of videos

  • @sunshine_rain_
    @sunshine_rain_ 6 месяцев назад

    Thanks that one is really working.

  • @metasok
    @metasok Год назад

    Thank you so much for this tutorial.

    • @GreatStackDev
      @GreatStackDev  Год назад

      You are so welcome! Glad you liked this light mode to dark mode website tutorial

  • @syedsufyannaqvi6812
    @syedsufyannaqvi6812 3 года назад +3

    Sir please make complete website as you did with college website some days before

    • @GreatStackDev
      @GreatStackDev  3 года назад +1

      Already Bht sare hai complete website design tutorial, Please check this playlist: ruclips.net/p/PLjwm_8O3suyNtV-ca8HkE_GW92CWJ0hIF

    • @GreatStackDev
      @GreatStackDev  3 года назад

      And Sure I will be making more such complete website tutorials

  • @brickstv3156
    @brickstv3156 Год назад

    Thank you this make things easer

  • @behindthescene2727
    @behindthescene2727 2 года назад

    Interesting #DarkMode #Webdesign

  • @hubersonncho9988
    @hubersonncho9988 Год назад

    Thank you my bro for sharing this amazing website i really appreciate it 👍👍

  • @Abbatyya
    @Abbatyya 3 года назад +1

    bro you videos are very useful and educative

    • @GreatStackDev
      @GreatStackDev  3 года назад

      Thank you bro, must watch this video to save the dark theme on browser to keep dark theme active on page reload: ruclips.net/video/2j_kBqpFK-g/видео.html

  •  2 года назад

    very good but until there i have tho learn a lot

  • @XPrime_05
    @XPrime_05 Год назад

    your videos are the best so far, thank you

  • @Sauravkumar056
    @Sauravkumar056 8 месяцев назад

    u got a subscriber for this.. Good Day!😃

  • @psjuniverse
    @psjuniverse 2 месяца назад

    After following the process when I refreshed my website it's reflect back to the previous mode how do I fix this please

  • @james-404
    @james-404 7 месяцев назад

    This was a great explanation, thank you brother

  • @alexmaglak
    @alexmaglak 7 месяцев назад

    Thank you very much, this helped me a lot.

  • @kalahira1018
    @kalahira1018 3 года назад +2

    Thank you so much brother😀

    • @GreatStackDev
      @GreatStackDev  3 года назад

      Thanks to you, Please check it's part 2 also.

  • @konandev4278
    @konandev4278 3 года назад

    thanks, when i know about you, i hope you can teach me somethings like this, i learned it, one more time Thanks so much.

  • @palakvyas7381
    @palakvyas7381 Год назад +1

    I'm using svg for the moon and sun icon. How to replace svg of sun in place of img src line?

    • @GreatStackDev
      @GreatStackDev  Год назад

      place your SVG code in a text file and rename as sun.svg and moon.svg
      then you can add it like a regular image with img tag

  • @yogaaditya25436
    @yogaaditya25436 Год назад

    great video, very useful, thanks for the knowledge bro 🔥

  • @veengez1284
    @veengez1284 2 года назад

    Thank you for the tourial friend, greetings from Indonesia