How to Style HTML hypertext links in CSS with visited, hover, active and focus

  Рет қаралды 26,420

Dave Gray

Dave Gray

Күн бұрын

Пікірлер: 57
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Hypertext links have default CSS styles, but most designs change those default styles to incorporate different link states including hover, active, visited and focus pseudo-classes. In this tutorial, you will learn how to change the hypertext link styles in your projects to match the color theme of your website and provide users with more feedback. If you are just getting started with CSS, I recommend going to the beginning of this CSS for Beginners playlist: kzbin.info/aero/PL0Zuz27SZ-6Mx9fd9elt80G1bPcySmWit
@alirezahekmati7632
@alirezahekmati7632 2 жыл бұрын
hello! just find your channel from the advanced javascript concept and its Amazing! came to your recent post to say your content is GOLD its way better than 99% of the information you can find on youtube please keep posting new videos we need you here! you can directly impact our life by helping us consume quality content.
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Thank you! 🙏
@theexile4694
@theexile4694 8 ай бұрын
How can I do this and have different links with different color schemes? Scenario: I have a header with some white text in it, however it has some links. When I change the a:x values to match, it looks great in the header but, now my links in the body are essentially invisible. Can I create a custom class for these changes or I can only use the root pseudo class to make the changes?
@ScriptRaccoon
@ScriptRaccoon 2 жыл бұрын
11:10 When I want the links to have the same color as the text, it is good practice to say "color: inherit". This way, you don't have to adjust your font color in two places in case you want to change it. This is because the links simply inherit the font color from the container.
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Great tip! I'll eventually get to themes with variable values, too.
@aragorn2753
@aragorn2753 Жыл бұрын
I just want to say that this is the first time in my life where i am in a rabbit hole of watching a series of tutorials from the same channel Thanks dave your tutorials are straight to the point and those extra information that you say in your tutorials are gold ❤
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Thank you!
@kartikarora3521
@kartikarora3521 2 жыл бұрын
Thanks a lot, this was really helpful. I already know CSS, but styling links is always a pain. I want to improve my knowledge of CSS, but I procrastinate a lot, but this video has helped me a lot. The other things that I struggle with are Form Styling, Animation, flex-shrink, flex-basis, grid-auto-rows. I'll be waiting for those tutorial in the series. Thank You!
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
You're welcome, Kartik! And you mention good topics that should be coming in the series. 💯
@Grihlo
@Grihlo 2 жыл бұрын
Thank you Dave!! Another cool way to highlight the hovered link is text-shadow. I completed one long video about HTML CSS and there was no information about the importance of the order for pseudo-elements and ancor element. Your explanation is really great and fundamental.
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
You're welcome! And great note! 💯
@vanessakimana3929
@vanessakimana3929 2 жыл бұрын
Thanks for these CSS series, your explanations are great and I believe it gave me the foundation I needed. Dave you rock, keep on the good work.
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
You're welcome! I will keep adding to this series too 🚀
@user-vatican
@user-vatican 4 ай бұрын
Thank you very mutch dear Dave for your teaching, after your classes i know more about css.
@GabrielSouza-yy2rq
@GabrielSouza-yy2rq 2 жыл бұрын
Its so great how you keep introducing new concepts as you show how they work simultaneously. It makes things so easy to understand and learn. I'm really thankful for your effort!
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
You're very welcome, Gabriel!
@elvispontes4165
@elvispontes4165 Жыл бұрын
You are the best teacher on youtube, hands down!!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Thank you!
@ruslangilyazov7733
@ruslangilyazov7733 2 ай бұрын
Thank you, Dave👏
@robinheyer708
@robinheyer708 Жыл бұрын
Thanks, Dave, for another great tutorial! Using HSL for links is very handy! I like increasing the last value by 20-25% to make it look like they're lighting up. (Opacity: 0.7 is actually quite similar) I was very disappointed that my (not so user-friendly) idea is not possible. Just like we see in the video I wanted to make the links the same color as the rest of the text but show them as italic (and maybe a bit bigger) and then have the visited links show as normal text but there's some security built into what can be changed in visited links according to MDN. Had me wondering for a while if I hadn't understood specificity, though!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Yes, there are a few exceptions and it sounds like you found one! Thank you for the kind words! 🙏
@TravinskiyVladislav
@TravinskiyVladislav 2 жыл бұрын
Thank you, Dave
@abdoulie1027
@abdoulie1027 Жыл бұрын
Keep up the good job ❤
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Thank you!
@iambrijeshtoo
@iambrijeshtoo Жыл бұрын
Thank you! ♥
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Welcome!
@stormbytes
@stormbytes Жыл бұрын
Some really great tips here!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Thank you!
@williammckeever4790
@williammckeever4790 2 жыл бұрын
Very informative series. Enjoying it a lot. Have you tried the live server extension from Microsoft yet? I just installed it and it actually has some nice features, like embedded preview, updates as you type without saving including css. Seems very stable too. Worth taking a look at in my opinion.
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Not yet! Thank you for letting me know! And I'm glad you are enjoying the series. 🙏💯
@Knards
@Knards 2 жыл бұрын
Thanks Dave!
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
You're welcome!
@IG7799-c4u
@IG7799-c4u 6 ай бұрын
Hi Dave, just a quick question at 10:30. You mentioned that putting the focus pseudo selector with the hover will increase accessibility to those users using screen readers, but why would that be the case? Since it makes the colour change for each link when it is put into focus, how will that benefit somebody who, I assume, cannot actually see the screen itself?
@sonamohialdin3376
@sonamohialdin3376 2 жыл бұрын
So good tutorial thank you
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
You're welcome!
@jorbitmultimedia
@jorbitmultimedia Жыл бұрын
how to change each of them separately,,,,am having a trouble in classing each of them
@cesmorf5398
@cesmorf5398 2 жыл бұрын
In your opinion, a newbie should start a career with front end or backend is best ?
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Other opinions may differ, but I think frontend is the place to start. You should learn the 3 pillars of web dev which I consider foundational knowledge: 1) HTML, 2) CSS and 3) Javascript. This is all runs in the browser. I think it would be difficult to understand how a server (backend) interacts with a browser (frontend) if you weren't knowledgeable of those basics.
@cesmorf5398
@cesmorf5398 2 жыл бұрын
@@DaveGrayTeachesCode thanks
@anubhavsingh176
@anubhavsingh176 6 ай бұрын
html completed css 7th vedio from web d playlist
@elric7371
@elric7371 2 жыл бұрын
Really good series Dave. What are the topics that still remain? and when styling when do you choose to use a div or say a already defined tag(p,header etc)? thanks
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Thank you and great questions! There are a lot of topics yet to go in the CSS series. As for div usage, I always try to use a semantic element first. If those don't make sense, then I will use a div. An overview of semantic elements here: kzbin.info/www/bejne/oYmWhZmaitajq7c
@elric7371
@elric7371 2 жыл бұрын
@@DaveGrayTeachesCode Thanks that clarified it for me . Looking forward to the rest of the series. Appreciate your hard work.
@raiappan1951
@raiappan1951 2 жыл бұрын
Professor, please make videos on data structures and problem solving in javascript.
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
Thank you for the request! 🙏
@yatin1370
@yatin1370 Жыл бұрын
Hi Dave, I have a doubt at 7:58... CSS file is saved and text-decoration is 'none'. How are the links underlined still?
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
Notice when I save the file just after that, the lines go away. I don't remember every detail of this (or any) video but this could just be a slow / late refresh from live server.
@biljanakotev1102
@biljanakotev1102 2 жыл бұрын
Is it best practice to use all a link states
@ifeanyiuche4064
@ifeanyiuche4064 Жыл бұрын
I am finding it confusing understanding why you use rem and em instead just px or %. Do rem and em does entirely different things?
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
I'm going to suggest you go back to lesson 4 in this series that covers Units & Sizes where your question is explained: kzbin.info/aero/PL0Zuz27SZ-6Mx9fd9elt80G1bPcySmWit
@datboimo00
@datboimo00 Жыл бұрын
hey i just want to ask you how do i make different hyperlinks to have different styles?? pls this is urgent
@DaveGrayTeachesCode
@DaveGrayTeachesCode Жыл бұрын
You are watching the right video to learn how.
@dharmeshgohil9375
@dharmeshgohil9375 2 жыл бұрын
can you teach step by step how to made website responsive it will be great help i feel difficulty there
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
This series will get into responsive design basics before it is complete. 🚀
@biljanakotev1102
@biljanakotev1102 2 жыл бұрын
Is it best practice to use all a link states all the time?
@DaveGrayTeachesCode
@DaveGrayTeachesCode 2 жыл бұрын
It is completely preference. You can just use the default styles for the link states, but most do prefer to change them to the theme of their website design.
CSS List Styles Tutorial for Beginners
16:37
Dave Gray
Рет қаралды 27 М.
CSS Units & Sizes Tutorial for Beginners
21:25
Dave Gray
Рет қаралды 36 М.
Миллионер | 1 - серия
34:31
Million Show
Рет қаралды 1,7 МЛН
Поветкин заставил себя уважать!
01:00
МИНУС БАЛЛ
Рет қаралды 6 МЛН
The new CSS pseudo-classes explained - :is() :where() :has()
13:50
Kevin Powell
Рет қаралды 138 М.
Swift Programming Tutorial for Beginners (Full Tutorial)
3:22:45
CodeWithChris
Рет қаралды 7 МЛН
The 6 most important CSS concepts for beginners
28:58
Kevin Powell
Рет қаралды 156 М.
Learn CSS Positioning Quickly With A Real World Example
8:32
Slaying The Dragon
Рет қаралды 659 М.
How I'd Learn Full-Stack Web Development (If I Could Start Over)
10:28
CSS Text and Fonts Tutorial for Beginners - Typography
24:03
Dave Gray
Рет қаралды 27 М.
Learn Web Development And ACTUALLY Get A Job | Ultimate Guide
1:33:52
James Cross
Рет қаралды 1,4 МЛН
Learn CSS Flexbox in 20 Minutes (Course)
20:37
Coding2GO
Рет қаралды 127 М.