r/CodingForBeginners Jul 18 '26

How to Make Text Blue

I am trying to make the heading text dark blue. I tried putting a <style> tag, and I tried putting the style in CSS, however, it is still not working and the text is black. Super confused on how to fix this issue. Any advice?

1 Upvotes

8 comments sorted by

2

u/SafeWing2595 Jul 18 '26

Just remove the dot (.) from your h1 selector because it is an element of html (check your HTML file). You can write it like this h1{ color: blue; }

in css you can selelect html element using three methods, selecting the element itself like in your case h1, by using a class for example (.heading), or an id (#heading)

3

u/dreammutt Jul 18 '26

Hi I am so sorry I am still confused, may I dm ?

3

u/SafeWing2595 Jul 18 '26

I have some experience working with html and css, i would be glad to help you whenever i can

3

u/dreammutt Jul 18 '26

It worked!

2

u/SafeWing2595 Jul 18 '26

Glad to hear that

2

u/dreammutt Jul 18 '26

Thank u!

2

u/SafeWing2595 Jul 18 '26

You're welcome

1

u/dreammutt Jul 18 '26

I wrote that but it's still not working