Jump to content


[Coding] Learning HTML, Part 1


  • You cannot reply to this topic
9 replies to this topic

#1 Ziveeman

    godlovesugly

  • Administrator
  • PipPipPipPipPipPipPipPipPipPip
  • 15,412 posts
  • First Name:Jason

Posted 12 April 2008 - 05:49 PM

Learning HTML
-Part 1-


This tutorial won't actually cover any tags or elements. This tutorial is more for learning HOW HTML works, so you don't exactly need a tutorial for every single little thing.

Also this is a repost of a really old topic and I wanted to add new stuff as well.

HTML stands for HyperText Markup Language. It is the original code for webpages, invented by Sir Tim Berners-Lee when he invented the World Wide Web. It's based off of SGML, which stands for Standard Generalized Markup Language.

Anyways, enough with the background :P I'm sure you wanna learn already!




First, open up Notepad.

This is your working space.

HyperText Markup Language is based on tags, elements and attributes.
We'll start out by a real life example.
In Notepad, copy and paste this text:

<html>	
<head>	
<title>My Webpage</title>	
</head>	
<body>	
Hello <b>world!</b>	
</body>	
</html>

Then go to File - > Save As, then on the drop-down labeled Save As Type, click and select All Files.
Then type in mywebpage.html as the file name then hit Save.
Go to wherever you saved the file then double-click on it.
It should read:

Quote

Hello world!

So what makes the page say "Hello world"?
Let's go over the coding of the webpage. Go back to Notepad.

The first line of code:

<html>

This basically tells the internet browser the reader is using to use HTML. This is required on all pages you make.
HTML is based on the < and the > tags. The majority of the HTML you write will be in these tags.
All tags open with the < and then close with the > sign. If the code is wrapped around text, such as the bold tag,
the end must end with </ and >. You'll learn more about this later.

The second line of code:

<head>


This is where all the code (such as Javascript) goes that isn't shown on a webpage. This tutorial doesn't cover the tag.

The third line of code:

<title>My Webpage</title>

This is the title of the webpage, as the code non-subtlely says. The title of the page is the top of the window.
As you read earlier, the title tag opens up with <, contains the word "title" to tell the browser that it is the title of the webpage, then ends with >.
After the <title>, the text "My Webpage" is there. If you want, you can change that to whatever you want. The end of the line is important. As you can see, it reads </title>.
This tells the browser that the title of the page is finished and can now be displayed. Remember that all tags close with a /.

The fourth line of code:

</head>

This is the end of the header tag.

The fifth line of code:

<body>

This is the body of the webpage. Everything you write between the <body> and </body> tags will be on the actual page of the browser.

The sixth line of code:

Hello <b>world!</b>

This is the displayed text. The <b> tag means that anything between the <b> and </b> tags will be bold.

The seventh line of code:

</body>

This closes the body.

The eighth line of code:

</html>

This closes the HTML of the page.

Take time to understand the code, these are the absolute basics that will allow you to learn HTML!

Sometimes I feel so sick at the state of the world I can’t even finish my second apple pie.


#2 Mezulu

    I'm So Meta, Even This Acronym

  • Senior Member
  • PipPipPipPipPipPipPip
  • 6,863 posts
  • First Name:Rob

Posted 16 April 2008 - 11:31 AM

yay for HTML!!!!

#3 Jujumasta

  • Gold Member
  • PipPipPipPipPipPipPipPip
  • 7,745 posts

Posted 16 April 2008 - 06:23 PM

wow! i never knew how to do this! :)






























i lied.

#4 Mezulu

    I'm So Meta, Even This Acronym

  • Senior Member
  • PipPipPipPipPipPipPip
  • 6,863 posts
  • First Name:Rob

Posted 17 April 2008 - 12:22 PM

HTML owns.

#5 Mezulu

    I'm So Meta, Even This Acronym

  • Senior Member
  • PipPipPipPipPipPipPip
  • 6,863 posts
  • First Name:Rob

Posted 10 January 2010 - 03:40 PM

We need to do a follow up to this.

#6 Ziveeman

    godlovesugly

  • Administrator
  • PipPipPipPipPipPipPipPipPipPip
  • 15,412 posts
  • First Name:Jason

Posted 10 January 2010 - 09:20 PM

What do you think we should cover next?

Sometimes I feel so sick at the state of the world I can’t even finish my second apple pie.


#7 topthisfact

    Member

  • Member
  • Pip
  • 10 posts
  • First Name:mike

Posted 18 February 2010 - 04:53 PM

thanks for the information
it helped me out ^_^

#8 Red Phazon

    Avatar by DeepVision

  • Moderator
  • PipPipPipPipPipPip
  • 3,902 posts

Posted 17 March 2010 - 11:54 PM

Perhaps the next should cover common tags and their usage?

Posted Image
"That's stupid, because black hole aren't flat." ~LeeF


#9 Mezulu

    I'm So Meta, Even This Acronym

  • Senior Member
  • PipPipPipPipPipPipPip
  • 6,863 posts
  • First Name:Rob

Posted 18 March 2010 - 02:46 AM

I think something important to cover is Doctype. I didnt learn that for a long time, and its something I regret not learning sooner

#10 Maximum-Can

    DO YOUR HOMEWORK

  • Forum Leader
  • PipPipPipPipPipPipPipPipPipPip
  • 10,339 posts
  • First Name:the snazz

Posted 18 March 2010 - 08:06 PM

View PostJujumasta, on 16 April 2008 - 06:23 PM, said:

wow! i never knew how to do this! :)
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
<br></br>
i lied.
:miner:





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users