DEV Community

Cover image for Do you keep forgetting to link your CSS file? Try this simple trick!

Do you keep forgetting to link your CSS file? Try this simple trick!

Savvas Stephanides on May 18, 2023

Ask any developer about one of the most frustracting things about web development, and you'll hear one thing again and again: My HTML couldn't re...
Collapse
 
schemetastic profile image
Schemetastic (Rodrigo)

Hahahaha, how is it possible to forget that? I mean, generally when you CSS that's the first thing you do!!! Also, is not April! What?

Collapse
 
savvasstephnds profile image
Savvas Stephanides

It's a lot more common than you might think. All you have to do is search "forgot html link" on Twitter and you'll get tons of tweets with the same frustration. I do it all the time, everyone will do it at some point.

Collapse
 
schemetastic profile image
Schemetastic (Rodrigo) • Edited

Wow! I'm wondering if the same happens with <script> tags, hahaha.

Thread Thread
 
savvasstephnds profile image
Savvas Stephanides

Yes it does. The trick also works with script tags 😀

Thread Thread
 
schemetastic profile image
Schemetastic (Rodrigo)

Hahaha... welll, that's a place I'd been before I think...

Collapse
 
craftyminer1971 profile image
CraftyMiner1971 • Edited

Brilliant! However, I don't know if it's the way I've got VSC set up, or what. But, when i did this and ctrl+clicked on the styles.css link, it didn't bring up a dialog box, but just opened the file, like it existed already!

If only there was a way to create a fully formatted css file with all the code already in it! HAHA

Collapse
 
savvasstephnds profile image
Savvas Stephanides

That's even better! 😂

No annoying pop-ups 😬

Collapse
 
windyaaa profile image
Windya Madushani

Nice article.

Collapse
 
savvasstephnds profile image
Savvas Stephanides

Thank you so much Windya! 👊

Collapse
 
yasas770 profile image
Yasas770

Nice one

Collapse
 
savvasstephnds profile image
Savvas Stephanides

Thank you!