confusedone — 2012-05-14T14:22:15-04:00 — #1
I am currently trying to learn HTML5, following smashing html5 book. they provide this code-
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8”>
font-family:Verdana, Geneva, sans-serif;
font-family:”Arial Black”, Gadget, sans-serif;
font-family:”Trebuchet MS”, Arial, Helvetica, sans-serif;
<h1>This Is the Big Head</h1>
<h2> Here Is the Second Head</h2>
The body text is styled for a bit of a eft margin and picks up the color of the body
along with its font. Notice that the background of the heads extends all the way
across the page. Also notice that a space (& nbsp;) gives the h2 text a ittle
indent so that it stays “within” the background. That’s not a problem with the h1
head because it’s centered.
when i put it in a text editor, it does not have any styling. Anyone help me out?
technobear — 2012-05-14T14:42:24-04:00 — #2
Yes. Although that code looks fine above, what you actually have is this:
Instead of "normal" quotation marks, you have some weird slanting quotation marks (which no doubt have a proper technical name :)). Replace them and you're good to go.
confusedone — 2012-05-14T14:49:44-04:00 — #3
Fantastic thanks!!!! How did you even spot that? i am pretty newish to web design and was looking at it thinking, well there are only 3 ways to add css, and i'm following all the rules, all the tags are in place etc....
Many many thanks!
technobear — 2012-05-14T14:54:06-04:00 — #4
They showed up squinty when I copied/pasted your code into my editor.
I noticed, too, that the CSS contains #h1. That implies that something has id=h1; I suspect it should just read h1.
confusedone — 2012-05-14T14:57:50-04:00 — #5
mate, you are truly a 'geezer' I was just looking at the header wondering why it is the only element that hasn't been styled -i forgot, when i was trying to work out why it wasn't getting styled i changed the <h1> to div tags and see what was going on. Forgot to delete the hash tag, doh!
Kind regards, Alan
technobear — 2012-05-14T15:29:49-04:00 — #6
Excellent. Nothing like getting two problems solved for the price of one. :lol: Glad I could help.
confusedone — 2012-05-14T15:32:18-04:00 — #7
And argyll too, nice to meet someone from the UK! To be honest i haven't been that active on this forum and have been looking for a decent and active forum that is more web-related. would you recommend this forum? Sorry to derail thread a bit...!
technobear — 2012-05-14T15:44:23-04:00 — #8
I most certainly would, although I may be just a wee bit biased. :lol: Seriously, there are a lot of knowledgeable folk around here and I've learned a good deal, so yes, I'd say stick around - it's well worth it.
As it's your thread, I doubt anyone will complain too much. :)
confusedone — 2012-05-14T16:10:52-04:00 — #9
Ok looking at your avi I can see the bias I'll kick around for a bit and see what is what !