Jump to content


Photo

Introduction to HTML


  • Please log in to reply
7 replies to this topic

#1 Eraserheads

Eraserheads

    Immortal Member

  • Members
  • PipPipPipPipPip
  • 375 posts

Posted 29 August 2006 - 05:55 AM

What is an HTML File?

HTML stands for Hyper Text Markup Language
An HTML file is a text file containing small markup tags
The markup tags tell the Web browser how to display the page
An HTML file must have an htm or html file extension
An HTML file can be created using a simple text editor

Do You Want to Try It?
If you are running Windows, start Notepad.

If you are on a Mac start SimpleText.

In OSX start TextEdit and change the following preferences: Open the the "Format" menu and select "Plain text" instead of "Rich text". Then open the "Preferences" window under the "Text Edit" menu and select "Ignore rich text commands in HTML files". Your HTML code will probably not work if you do not change the preferences above!

Type in the following text:


<html>
<head>
<title>Title of page</title>
</head>
<body>
This is my first homepage. <b>This text is bold</b>
</body>
</html>


Save the file as "mypage.htm".

Start your Internet browser. Select "Open" (or "Open Page") in the File menu of your browser. A dialog box will appear. Select "Browse" (or "Choose File") and locate the HTML file you just created - "mypage.htm" - select it and click "Open". Now you should see an address in the dialog box, for example "C:\MyDocuments\mypage.htm". Click OK, and the browser will display the page.


Example Explained
The first tag in your HTML document is <html>. This tag tells your browser that this is the start of an HTML document. The last tag in your document is </html>. This tag tells your browser that this is the end of the HTML document.

The text between the <head> tag and the </head> tag is header information. Header information is not displayed in the browser window.

The text between the <title> tags is the title of your document. The title is displayed in your browser's caption.

The text between the <body> tags is the text that will be displayed in your browser.

The text between the <b> and </b> tags will be displayed in a bold font.


HTM or HTML Extension?
When you save an HTML file, you can use either the .htm or the .html extension. We have used .htm in our examples. It might be a bad habit inherited from the past when some of the commonly used software only allowed three letter extensions.

With newer software we think it will be perfectly safe to use .html.

#2 engines

engines

    Immortal Member

  • Members
  • PipPipPipPipPip
  • 1,196 posts

Posted 31 August 2006 - 02:38 PM

What is an HTML File?


a good start for a bigiiner well done mate !!

#3 Eraserheads

Eraserheads

    Immortal Member

  • Members
  • PipPipPipPipPip
  • 375 posts

Posted 02 September 2006 - 02:57 AM

a good start for a bigiiner well done mate !!


thanks dude. :P


So You Want To Set Up Your First Site, Huh?

Putting A Site Together
Lately, I've been getting a lot of email asking about setting up a site with numerous internal pages. For example, let's say you create a homepage. We'll call it homepage.html.
You then create three more pages:

links.html (A page of your favorite links)
photos.html (A page of your favorite photos)
story.html (A page with one of your best stories)


At the moment they are just sitting on your hard drive (or floppy disc) and now you want them to become a site. Homepage.html will offer links to the three other pages. That'll be your first site. Good. Now, how do you do it?

The HREF Links
First off, I'm assuming you already have a place to post these pages.
So, now you have a place for your files. This "place" you have been given is actually a small section of a hard drive on a server somewhere. In computer terms, you have a directory where you can place your files. Think of this directory like an equal to a floppy disc. It's a contained area where the pages, and all the images that go on those pages will be housed.
This is important to remember when you're writing the links that will connect these four pages together.


First off, let's attach to a page outside of your site. Here's the basic format:

<A HREF="http://www.p2plife.com">Click Here</A>
Note the address above is a full URL. ("URL" stands for Universal Resource Locator. It's a fancy way of saying "web address") It starts with that http thing and ends with that .com deal. It's a full address.

Now let's look at what I call an internal link. This is a link that stays within your own site. One of your pages is calling for another one of your pages. We'll say this is a link from your homepage.html to links.html. Remember that from above? Here's the format:


<A HREF="links.html">Click Here</A>
Notice I'm only calling for the page, without the full address attached. Why? Well, because I don't need it. To make the point a little stronger, let's look at the directory structure of web addresses.


Internal Links
Now we put together a site in your own directory. Once again, you have a homepage called "homepage.html" and three sub-pages that you want to link to from homepage.html. They are "links.html," "photos.html," and "story.html". First off, you need to to FTP, or "upload" all four pages to your directory. Now, here's the first link on homepage.html that will call up your links.html page.

<A HREF="links.html">Click Here</A>


To Use Full URL, Or Not To Use Full URL
If you are linking to a page off of your site, then you must use the full URL. The reason is that you are leaving your own directory. In fact, the chances are really good that you are leaving your server all together. Because of that, you need to offer your HREF command the full address to the new site.
But when you're staying within your own site, as we are above, you need only call for the page name. You see, your directory is a closed home for all of your pages. If you only call for a page or an image through its name minus the full address, what happens is that the server looks for the page or the image inside the same home that houses the page that called for it. In other words, servers will search a page's home directory by default. That's good to know when you create your links. It means you only have to use the page's name minus the full URL.

What If I Do Use The Full URL?
Always playing the rebel, huh? The answer is that your internal links might run slower. You see, if you use the full address, what happens is that when your user clicks on a link, a full search process begins. First the server is located, next the directory is located, then the page is located. Whereas, if you use only the name, the search is already at its destination. The server simply searches itself. Slick, huh?


The Home Page Links
So what is written onto homepage.html to link the pages together? This:

<A HREF="links.html">Click Here for My Favorite Links</A>
<A HREF="photos.html">Click Here for My Photos</A>
<A HREF="story.html">Click Here for My Best Story</A>


Now you're all linked up. Hey! You made more than a couple of pages. You linked them all together. You made a site.



Enjoy! :lol:

Edited by Eraserheads, 02 September 2006 - 03:00 AM.


#4 rbnair_in

rbnair_in

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 05 January 2007 - 09:32 AM

[quote name='Eraserheads' post='3821' date='Aug 29 2006, 11:25 AM']
What is an HTML File?

I liked it mate, simple and straight. Give us more.....

Edited by rbnair_in, 05 January 2007 - 09:47 AM.


#5 rbnair_in

rbnair_in

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 05 January 2007 - 09:42 AM

I'm a beginner. I liked the simple way of explanation. Can u go ahead and explain certain other commands of HTML. Like putting in some text, picture and text with picture around it........... Thanks for the introduction This is first time on the site and I think I made a mistake, not sure though, may have posted this topic, as mine, but it is not. Ignore the mistake, I'm just a novice. Will learn, by and by.

#6 Glimmervoid

Glimmervoid

    Member

  • Members
  • PipPip
  • 19 posts

Posted 19 January 2007 - 01:24 AM

Kindly please update this.. I love to be tutored. Thanks a lot Bro.. B)

#7 Eraserheads

Eraserheads

    Immortal Member

  • Members
  • PipPipPipPipPip
  • 375 posts

Posted 08 June 2007 - 06:21 AM

Hehehe... really? Hmmm.... what do you want to know more?

#8 chrisadam12

chrisadam12

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 15 September 2010 - 11:33 AM

What is an HTML File?

HTML stands for Hyper Text Markup Language
An HTML file is a text file containing small markup tags
The markup tags tell the Web browser how to display the page
An HTML file must have an htm or html file extension
An HTML file can be created using a simple text editor

Do You Want to Try It?
If you are running Windows, start Notepad.

If you are on a Mac start SimpleText.

In OSX start TextEdit and change the following preferences: Open the the "Format" menu and select "Plain text" instead of "Rich text". Then open the "Preferences" window under the "Text Edit" menu and select "Ignore rich text commands in HTML files". Your HTML code will probably not work if you do not change the preferences above!

Type in the following text:


<html>
<head>
<title>Title of page</title>
</head>
<body>
This is my first homepage. <b>This text is bold</b>
</body>
</html>

Save the file as "mypage.htm".

Start your Internet browser. Select "Open" (or "Open Page") in the File menu of your browser. A dialog box will appear. Select "Browse" (or "Choose File") and locate the HTML file you just created - "mypage.htm" - select it and click "Open". Now you should see an address in the dialog box, for example "C:\MyDocuments\mypage.htm". Click OK, and the browser will display the page.


Example Explained
The first tag in your HTML document is <html>. This tag tells your browser that this is the start of an HTML document. The last tag in your document is </html>. This tag tells your browser that this is the end of the HTML document.

The text between the <head> tag and the </head> tag is header information. Header information is not displayed in the browser window.

The text between the <title> tags is the title of your document. The title is displayed in your browser's caption.

The text between the <body> tags is the text that will be displayed in your browser.

The text between the <b> and </b> tags will be displayed in a bold font.


HTM or HTML Extension?
When you save an HTML file, you can use either the .htm or the .html extension. We have used .htm in our examples. It might be a bad habit inherited from the past when some of the commonly used software only allowed three letter extensions.

With newer software we think it will be perfectly safe to use .html.




________________________________________________________________________



Want to get-on Google's first page and loads of traffic to your website? Hire a SEO Specialist from Ocean Groups http://oceangroups.org/'>seo pecialist




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users