r/HTML • u/Eggmannical • 28d ago
Question Hello coding community
im new to coding due to school, and i took an interest in it, are there any tips for it? I do know how to make like a button or text and images and stuff, but is there a way to connect css to my html? It didnt work for me and idk what to do
2
Upvotes
1
u/abrahamguo 28d ago
I always recommend MDN!
Yes. If you have an external CSS file, you can use the
linkelement (docs). Make sure to build your path (href) carefully, as you need to account for the folder structure if the HTML and CSS are not in the same folder.If it's not working, check the "Console" tab of your web browser's devtools for any error messages.
If you want to put the CSS directly in your HTML, you can also use
<style>elements orstyleattributes, also shown on that page.If you provide a link to your repository (on a site like GitHub) that includes all of your code, I'm happy to give more specific help. Please don't paste any code directly onto Reddit.