|
Until you sign up you can't do much. Yes, it's free.
|
|
|
|
|
|
|
 | / / / Viewing Topic
|  |
( SilverDragon1Wings )
Executive
|
I read the 'CSS and HTML help' post before posting this topic, and that confused me instead of giving me pointers. So I'm learning HTML by that website htmldog.com, and I am on the CSS code practice. Thing is, the first lesson they have is incorporating color into the text. They start out with in-line style color codes, and I tried incorporating this into my text editor {notepad...lol} and for some reason, the code isn't doing anything. What am I doing wrong? This is the tag that they have for in-line style: <p style="color: red">text</p> I tried playing around with it to see what else could work, but since I'm learning, that is kind of hard to do. Do you guys need a screen shot of what I'm typing in as the code, or can you easily tell from this post what I'm doing wrong?
|
|
|
|
|
 LiveWire Humor
|
|
|
|
( SilverDragon1Wings )
Executive
|
If I need to use the codes for the actual colors, why didn't the tutorial site mention that? Or is that type of code advanced for what I'm learning? {I'm in the beginner tutorial}
|
|
|
Dexus
Swami
Patron
|
So if I understand you correctly your simply typing in | Code: | | <p style="color: red">text</p> | Into notepad and saving it etc. then trying to view using a web browser?
------- Bow before the forces of Chaos. Let the Galaxy burn and the heavens bleed!
|
|
|
|
|
|
|
|
|
Dexus
Swami
Patron
|
Oh and I forgot, when saving it, don't save it as a text file. Change it to all files and add the .html extension.
------- Bow before the forces of Chaos. Let the Galaxy burn and the heavens bleed!
|
|
|
kellyxfanelly
Dairy Product Addict
|
Changing the text color? I usually use this; <font color="color">
------- MOTOCROSS = L0VE
|
|
|
( SilverDragon1Wings )
Executive
|
I tried to screen capture the code, but I don't know how to put that into here, so I guess I'll have to type out what I did: So I wanted to write something and do HTML/CSS around that, but I couldn't think of anything so I put in lyrics....lol. Anyway, this is the beginning code I have. It's just a portion of what is in notepad, because there's too much script to copy and paste into here. I did include the closing tags for head and body. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>CSS Practice</title> </head> <body> <h1>CSS and HTML</h1> <p style="color: blue"> <h2>I'm not Jesus</h2> <h3>Apocalyptica</h3></p> This is the way I tried playing with it, because when I put just the code in, it would come up as 'text' written in the document, instead of the code changing the color of the script. And I changed the color that I wanted it to be, from what HTML dog used.
|
|
|
|
|
|
|
Dexus
Swami
Patron
|
Now I see your problem! <p style="color: blue"> Changes every bit of text in a paragraph blue. However you don't have paragraphs, you have 2 different header tags. If your looking every bit of text on the page to be of a certain colour you should really have this: | Code: | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>CSS Practice</title> <style type="text/css"> body { color: blue;} </style> </head> <body> <h1>CSS and HTML</h1> <h2>I'm not Jesus</h2> <h3>Apocalyptica</h3></p> </body> </html> |
------- Bow before the forces of Chaos. Let the Galaxy burn and the heavens bleed!
|
|
|
( SilverDragon1Wings )
Executive
|
The lyrics follow, and those are in paragraphs, not headers. Does that change anything? I was kind of hoping to put the headers in blue font and the lyrics {paragraphs} into...I dunno...green or any other color.
|
|
|
Dexus
Swami
Patron
|
Quote: from SilverDragon1Wings at 7:50 pm on Sep. 11, 2008
The lyrics follow, and those are in paragraphs, not headers. Does that change anything? I was kind of hoping to put the headers in blue font and the lyrics {paragraphs} into...I dunno...green or any other color.
It does change everything but any other tags you enter with a different style will change accordingly. If you wanted to change each colour separately you could have. | Code: | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>CSS Practice</title> <style type="text/css"> body { color: blue;} h1 { color: black;} h2 { color: red;} h3 { color: green;} p { color: yellow;} </style> </head> <body> <h1>CSS and HTML</h1> <h2>I'm not Jesus</h2> <h3>Apocalyptica</h3></p> </body> </html> | It just means now with the body colour tag, anything not inside either the h1, h2, h3, and p tags is now blue. Post edited at 11:57 am on Sep. 11, 2008 by Dexus
------- Bow before the forces of Chaos. Let the Galaxy burn and the heavens bleed!
|
|
|
|
| Looking for something else?
|
|
|
|
|
|
 | / / / Viewing Topic |  |
|