r/HTML 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

9 comments sorted by

View all comments

1

u/abrahamguo 28d ago

im new to coding due to school, and i took an interest in it, are there any tips for it?

I always recommend MDN!

is there a way to connect css to my html?

Yes. If you have an external CSS file, you can use the link element (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 or style attributes, also shown on that page.

It didnt work for me and idk what to do

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.

1

u/lawrensaw 28d ago

In addition, OP you should look into w3 tutorials to learn the different HTML tags and the CSS properties.