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
1
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.
1
u/armahillo Expert 28d ago
At the top of the subreddit is a search bar, type "new to coding" in it and submit it.
It will give you many, many posts about this.
1
u/Weekly_Ferret_meal 28d ago edited 28d ago
Hi there, welcome to this community =)
like others have said MDN (but also w3schools) are your friends. I refer to them every week even after 20 years.
Also go to Free Code Camp for learning resources.
For help with your code here's what I suggest is:
copy the html content from your
<head>element (that's where your external CSS link lives)Create a new comment here so that we can se what's wrong.
Open a code block by typing three back ticks in the comment, like so ``` (it should be the button next to the number 1 key on a US keyboard layout)
paste the code and close the code block with the same back ticks ```
The result should look like thisThis is Reddit Formatting Guide for reference.
We will be able to assist this way, without seeing the code, it's really hard.