Go Back   Computer Forums > Web Design | Website Development > Web Programming
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 08-16-2009, 06:16 PM   #1
Daemon Poster
 
dudelewis1's Avatar
 
Join Date: Jun 2009
Posts: 765
Default My noobiness at html

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.
__________________

__________________
Athlon II x2 255 @ 3.1ghz | 4 gb ddr3 ram| 500+80 gb wd hd | Sapphire 5450 | Win7 | Hanns G 20"

Toshiba Satellite | Core2Duo @ 2.0 ghz | 3gb ram | 250 gb hd | lolintelgma | Ubuntu 10.04
dudelewis1 is offline   Reply With Quote
Old 08-16-2009, 09:01 PM   #2
Fully Optimized
 
tom-knox's Avatar
 
Join Date: Jun 2007
Posts: 2,451
Send a message via MSN to tom-knox
Default Re: My noobiness at html

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
__________________

__________________
New laptop:
2.1 Ghz Core 2 Duo processor :: nVidia GT150m :: 15.6" HD LCD :: 4gb RAM :: 320gb HDD

New player: iPhone 4 32gb
tom-knox is offline   Reply With Quote
Old 08-17-2009, 07:18 AM   #3
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: My noobiness at html

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.
berry120 is offline   Reply With Quote
Old 08-17-2009, 09:52 AM   #4
Daemon Poster
 
dudelewis1's Avatar
 
Join Date: Jun 2009
Posts: 765
Default Re: My noobiness at html

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.
__________________
Athlon II x2 255 @ 3.1ghz | 4 gb ddr3 ram| 500+80 gb wd hd | Sapphire 5450 | Win7 | Hanns G 20"

Toshiba Satellite | Core2Duo @ 2.0 ghz | 3gb ram | 250 gb hd | lolintelgma | Ubuntu 10.04
dudelewis1 is offline   Reply With Quote
Old 08-18-2009, 12:44 PM   #5
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: My noobiness at html

Quote:
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.
berry120 is offline   Reply With Quote
Old 08-18-2009, 01:06 PM   #6
Daemon Poster
 
dudelewis1's Avatar
 
Join Date: Jun 2009
Posts: 765
Default Re: My noobiness at html

Quote:
Originally Posted by berry120 View Post
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.
__________________
Athlon II x2 255 @ 3.1ghz | 4 gb ddr3 ram| 500+80 gb wd hd | Sapphire 5450 | Win7 | Hanns G 20"

Toshiba Satellite | Core2Duo @ 2.0 ghz | 3gb ram | 250 gb hd | lolintelgma | Ubuntu 10.04
dudelewis1 is offline   Reply With Quote
Old 08-18-2009, 01:21 PM   #7
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: My noobiness at html

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
berry120 is offline   Reply With Quote
Old 08-18-2009, 08:00 PM   #8
Daemon Poster
 
dudelewis1's Avatar
 
Join Date: Jun 2009
Posts: 765
Default Re: My noobiness at html

Holy Cow! 12 errors and 16 warnings... is that alot for 80 lines of html?

I need to get a modern book...
__________________
Athlon II x2 255 @ 3.1ghz | 4 gb ddr3 ram| 500+80 gb wd hd | Sapphire 5450 | Win7 | Hanns G 20"

Toshiba Satellite | Core2Duo @ 2.0 ghz | 3gb ram | 250 gb hd | lolintelgma | Ubuntu 10.04
dudelewis1 is offline   Reply With Quote
Old 08-18-2009, 09:17 PM   #9
Fully Optimized
 
tom-knox's Avatar
 
Join Date: Jun 2007
Posts: 2,451
Send a message via MSN to tom-knox
Default Re: My noobiness at html

Simply put... Yes that's a lot a lot
__________________
New laptop:
2.1 Ghz Core 2 Duo processor :: nVidia GT150m :: 15.6" HD LCD :: 4gb RAM :: 320gb HDD

New player: iPhone 4 32gb
tom-knox is offline   Reply With Quote
Old 08-19-2009, 06:41 AM   #10
Site Team
 
berry120's Avatar
 
Join Date: Jul 2009
Location: England, UK
Posts: 3,425
Default Re: My noobiness at html

Quote:
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
__________________

berry120 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 11:30 AM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0