My noobiness at html

dudelewis1

Daemon Poster
Messages
765
Just fyi, the extent of my html knowledge is in a book i got for 25 cents from a garage sale...

Using styles, how do I apply a font to an entire page? What I've been trying using:

Code:
<STYLE TYPE="text/css">
		body
			<!--
				{
				font-family:sans;
				}
			-->
</STYLE>

And the text still shows as Times New Roman.
 
It is 2 oclock in the morning so i might be missing something but i can say at least that you should remove the <!-- and --> as there render the code inside them as disabled, and should only be used to wrap round comments
 
The above reply is correct as far as I see :)

One other point - you should always write your tags / attributes in lower case these days. It never used to matter and so everyone used to use upper case (years and years ago) however XHTML requires them to be in lower case and that's been the standard for a fair while now.
 
Thanks for the help, it still seems to work with the <--comments-->

I put the 'body' in the comments and it worked out.

Berry, thanks for the modernization tip, my book is from sometime in the 90's so I may be a little dated.
 
Berry, thanks for the modernization tip, my book is from sometime in the 90's so I may be a little dated.
Yup, that would be why! Another thing to note is that XHTML (which is really what you should be using nowadays) requires all tags to be closed before it will validate because it's based on XML, HTML is based on SGML hence it doesn't. This isn't usually an issue, but tags like <br> that would've been previously fine should now be written as <br/> (which is short for <br></br>). Same goes for images and the like.
 
Yup, that would be why! Another thing to note is that XHTML (which is really what you should be using nowadays) requires all tags to be closed before it will validate because it's based on XML, HTML is based on SGML hence it doesn't. This isn't usually an issue, but tags like <br> that would've been previously fine should now be written as <br/> (which is short for <br></br>). Same goes for images and the like.

Thanks, right now I've only got the index and one other page so it won't be too hard to modernize.
 
Personally I'd recommend validating all the pages you write with XHTML to make sure they're ok in modern times - the validator will generally complain quite loudly if they're not which should stop you getting into any bad habits :)
 
Holy Cow! 12 errors and 16 warnings... is that alot for 80 lines of html?

I need to get a modern book...
 
Holy Cow! 12 errors and 16 warnings... is that alot for 80 lines of html?

I need to get a modern book...
Yes, a modern book would help ;) HTML / XHTML has changed a LOT since the mid 90s!

However, if you fancy pasting the HTML here then I'll take you through what the warnings /errors mean ifya like :)
 
Back
Top Bottom