Go Back   Horror.com Forums - Talk about horror. > Horror.com Lobby > Horror.com General Forum
Register FAQ Community Calendar

Reply
 
Thread Tools
  #11  
Old 10-24-2008, 07:09 AM
Festered Festered is offline
Banned
 
Join Date: Sep 2008
Location: Sweaty Taint, USA
Posts: 1,093
Quote:
Originally Posted by Vodstok View Post

I will definitely introduce CSS once I get the html basics in place, so keep your eyes peeled.
Consider this thread bookmarked! :cool:
Reply With Quote
  #12  
Old 10-24-2008, 07:41 AM
Vodstok's Avatar
Vodstok Vodstok is offline
Fear scented candle
 
Join Date: Jan 2004
Location: The edge of forever
Posts: 13,650
Okay, so now we have a boring white page. Cool. Now we want to actually show something in it. Lets break down what we have so far:
We have the outer HTML tags:
<html>
</html>

This tells the browser, “This is a web page”. It’s kind of like starting every sentence with “I’m speaking English”, its pretty unnecessary and will get ignored, but include them anyway.

Next, we have the head tags, which are holding the title tags:
<head>
<title></title>
</head>

The head holds lots of important things that will be explained later (especially when we get into CSS and JavaScript), but for now, we are only concerned with the title. What does it do? Notice how the top of your web browser says “Horror.com – Talk about horror” or something similar? That’s the title. That’s is what it does. Nothing else. But that is pretty cool, right? If you put something in the Title tags, it shows up in the title bar of the browser.

For the record, it will not display images or formatting, so you cant italicize the title or anything fun like that.

Finally, we have the body tags:
<body>

</body>


This is where “everything else” (otherwise known as “content”) goes. This is where every other tutorial in existence has you type in “Hello World!”. Not me though. Type in something else; anything else. Try cutting and pasting this into your HTML page:

<html>
<head>
<title>This is my kick-ass page title!!!</title>
</head>
<body>
My page has a hot body.
</body>
</html>


Yes, it’s very immature. Complain to someone who cares. Otherwise, enjoy my sparkling wit.
Reply With Quote
  #13  
Old 10-24-2008, 07:42 AM
Vodstok's Avatar
Vodstok Vodstok is offline
Fear scented candle
 
Join Date: Jan 2004
Location: The edge of forever
Posts: 13,650
Now for some notes:

If you are using one of the html editors I suggested, you may notice that rather than tags, you are getting gobbledygook. That is because some of them are too smart for their own good and capture the formatting from web pages when you copy and paste. To avoid this, copy and paste into notebook, then copy and paste that. Notebook is a “plain text” editor, so all formatting is stripped and only clean, pretty code is left.

I will also use this opportunity to share with you a little bit of “Best Practice”, basically the “right” or “Best” way to do things. As this is going to be XHTML rather than plain old HTML, there are some rules. Every tag must have a closing tag. So every <html> must have a </html>, every <head> must have a </head>, etc etc. There are “non enclosing” tags that seem to break this rule, but we will cover that later, and how they don’t really break the rule.

The last bit is this, pay attention to your nesting. Notice how the head and body are completely inside the <html> tags, and how the <title> tags are completely inside the <head>? This is very important. If you don’t, you end up with some batshit crazy looking page that will make you pull your hair out trying to figure out what the hell you did wrong. For a visual example:

GOOD:
<html>
<head>
<title>This is my kick-ass page title!!!</title>
</head>
<body>
My page has a hot body.
</body>
</html>



BAD:
<html><title>
<head>
This is my kick-ass page title!!!</title>
</head>
<body>
My page has a hot body.

</html></body>


Dropped on its head as a child, saves the day with the fat kid:
<title>
</ht
<heml> BA-BY RUTH!!!</title>
</head>
<bodad>
<hty>
HEY YOU GUYS!!!!
ml></body>
Reply With Quote
  #14  
Old 10-25-2008, 11:10 AM
Festered Festered is offline
Banned
 
Join Date: Sep 2008
Location: Sweaty Taint, USA
Posts: 1,093
So, when's the next installment. I knew this stuff already.
Reply With Quote
  #15  
Old 10-25-2008, 11:24 AM
novakru's Avatar
novakru novakru is offline
Waste Disposer
 
Join Date: Jul 2005
Location: suburban hell
Posts: 5,421
Not so fast Festered
Some people here are in the back of the classroom.
I'm still on the first page...for the third time:o
Reply With Quote
  #16  
Old 10-25-2008, 12:09 PM
Festered Festered is offline
Banned
 
Join Date: Sep 2008
Location: Sweaty Taint, USA
Posts: 1,093
Quote:
Originally Posted by novakru View Post
Not so fast Festered
Some people here are in the back of the classroom.
I'm still on the first page...for the third time:o
"Little brown eel comes out of the cave... Swims into the hole... Comes out of the hole... Goes back into the cave again... It's not too good is it Chief?"- Quint in Jaws
Reply With Quote
  #17  
Old 10-25-2008, 10:33 PM
missmacabre's Avatar
missmacabre missmacabre is offline
Evil Dead
 
Join Date: Feb 2007
Location: Canada
Posts: 4,581
Send a message via MSN to missmacabre
Question: Why don't you have this bit at the beginning? We were told by the head of our department that you must have it at the beginning of a site.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
__________________
Reply With Quote
  #18  
Old 10-25-2008, 11:00 PM
neverending's Avatar
neverending neverending is offline
Cranky

 
Join Date: Oct 2003
Posts: 12,416
Vodstock is teaching the very basics of html here, and your instructor is talking about XHTML- an updated and expanded version of html. You can read about the differences between html 4 and XHTML, and why you need that statement at the beginning of an XHTML document, here:

http://www.w3.org/TR/xhtml1/

If you're just going to use pretty basic htrml and some tricks here and there, you don't need to worry about DOCTYPE declarations.
__________________
Lee Widener, Author Website

Cartoon Artwork, Underground Art, Other Weird Stuff
Reply With Quote
  #19  
Old 10-26-2008, 09:21 AM
Psycom5k's Avatar
Psycom5k Psycom5k is offline
Chrono's Lesbian Lover
 
Join Date: Sep 2007
Posts: 2,928
01111001 01101111 01110101 00100000 01100111 01110101 01111001 01110011 00100000 01110011 01110101 01100011 01101011 00100000 01100001 01110100 00100000 01100010 01101001 01101110 01100001 01110010 01111001
__________________
Quote:
You're not your job. You're not how much money you have in the bank. You're not the car you drive. You're not the contents of your wallet. You're not your fucking khakis. You're the all-singing, all-dancing crap of the world.
Reply With Quote
  #20  
Old 10-26-2008, 09:31 AM
missmacabre's Avatar
missmacabre missmacabre is offline
Evil Dead
 
Join Date: Feb 2007
Location: Canada
Posts: 4,581
Send a message via MSN to missmacabre
Quote:
Originally Posted by Psycom5k View Post
01111001 01101111 01110101 00100000 01100111 01110101 01111001 01110011 00100000 01110011 01110101 01100011 01101011 00100000 01100001 01110100 00100000 01100010 01101001 01101110 01100001 01110010 01111001
01000001 01101110 01111001 01101111 01101110 01100101 00100000 01100011 01100001 01101110 00100000 01100110 01101001 01101110 01100100 00100000 01100001 00100000 01100010 01101001 01101110 01100001 01110010 01111001 00100000 01110100 01110010 01100001 01101110 01110011 01101100 01100001 01110100 01101111 01110010 00101110
__________________
Reply With Quote
Reply


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

Forum Jump


All times are GMT -8. The time now is 04:46 PM.