Crash course in HTML

ddrueding

Fixture
Joined
Feb 4, 2002
Messages
19,729
Location
Horsens, Denmark
I threw this together in the last few minutes for a friend. If you have input that would be great. I don't want it any longer or more complicated than what it is, but if there are errors or clarifications that would be fab.


Summary:



Web pages are made of a bunch of HTML files and some other supporting files. HTML files are just text files that have the extension .HTML, .html, .HTM, or .htm. The text in the files is the raw code that pages are made of. Supporting files could include pictures, videos, or other stuff that the HTML files refer to.



Creating a file:



The first thing that you need to do is create a blank .HTML file. Here’s how:



Click on Start -> All Programs -> Accessories -> Notepad



This is the most basic text editor in the Windows world, and a great place to start. You start with a blank .txt file, but we want .html.



Click on File -> Save as…



You’ll notice that the “Save as type” is .txt – Change it to “All Files”

You’ll notice that the file name is *.txt – change it to “index.html” and save it somewhere you’ll remember it. (Desktop maybe?)



You now have a blank .html file. If you open this file in a web browser, all the tags and code will be translated to what you see on the screen. This is how you will test your work.



All pages should start with this:



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"

"http://www.w3.org/TR/html4/strict.dtd">

<html>

<body>



And end with this:



</body>

</html>



(feel free to copy/paste this into the top/bottom of your pages)



Basically, this tells browsers how to read your page.



Tags:



Tags are what make a page more than plain text. Tags allow you to change the appearance of text, insert pictures, and do pretty much everything else. All tags are the same. They begin with a less-than sign: < and end with a greater-than sign: >. What goes inside the < and > is the tag. Learning HTML is learning the tag to perform whatever command you want to do.



Here are the tags you’ll need, in order of importance:



Line Breaks (same as pressing enter – just pressing enter in the code does nothing)



<br>



Links (something that you can click to go to another page)



<A HREF="web address here">what you want the link to say</A>



Example



<A HREF="http://www.tweakt.com">Tweak’t Gaming Center</A>



Images (any picture on your page)



<IMG SRC="filename">



Example



<IMG SRC="image.gif">



Text Formatting (Changing the appearance of text)



<strong>Bold</strong>



<em>Italic</em>



<font size=5>big</size>



Size can be from 1 to 7 (normal is 3)



Combining Tags Examples



<A HREF="http://www.tweakt.com"><IMG SRC="image.gif"></A>



<A HREF="http://www.tweakt.com"><strong>Tweak’t Gaming Center</strong></A>



<A HREF="http://www.tweakt.com"><strong><em>Tweak’t</em> Gaming Center</strong></A>



This is enough to create a fun page. When you have this down, I’ll give you cheat sheet #2, which begins “forget all that formatting stuff and use CSS”.
 

fb

Storage is cool
Joined
Jan 31, 2003
Messages
726
Location
Östersund, Sweden
Maybe you should tell your friend to use " around values, as in <font size="5">big</font>? I don't know if it's 100% necessary in HTML4, but it's good if he/she is going to code XHTML sometime in the future. And you wrote </size> instead of </font> after the <font size="5">, otherwise it's fine as far as I can see.
 

GIANT

Learning Storage Performance
Joined
Apr 8, 2002
Messages
234
Location
Highway To Hell

About the only thing that interests me in working with HTML code these days is opening up an HTML file and hand-optimising the code to make it smaller and presumably faster.

I recall several years ago, back around the advent of HTML 4, that if you mentioned that you were "studying how to write HTML" you might get labeled as an idiot or a redneck.

By that time, webpage editors (like FrontPage) were already common and there were free-ware webpage editors as well, making the need for composing a typical webpage in a text editor rather ludicrous.

For the computer newbie at that time, it seemed that these people would go out and buy a computer, then take some computer classes covering word processing, surfing the web, and HTML. I suspect most of them would get through the word processing and websurfing courses relatively unscathed, but would likely become bogged down dealing with HTML code in a text editor, causing them to begin consuming great quantities of beer to help them better understand HTML.

I think what got the HTML/redneck idea going for a bit of time was a highly-visited (top 10 most visited on the Internet) satire website that used to exist on GeoCities called "The Trailer Page" that featured all sorts of toothless rednecks living in mobile homes (a.k.a. -- "tornado magnets"). Reading through their "biographies," you would occasionally read something like "...and I've been studying HTML in my spare time."


 

fb

Storage is cool
Joined
Jan 31, 2003
Messages
726
Location
Östersund, Sweden
I'm pretty lazy, so I mostly just steal the markup from some of my old pages and adjust it a bit, and use CSS to control the layout. I think it's faster than poking around in a WYSIWYG editor.

But of course, the best way to get a homepage is to buy it from a real pro, like Swedens own WebIngO. :viking:
 

fb

Storage is cool
Joined
Jan 31, 2003
Messages
726
Location
Östersund, Sweden
Well, you could say that his style of programming is a bit unusual in this millennium. I kind of like the children's page though.

Another fine example of HTML-horror and Javascript abuse: www.serietidningar.com, a homepage about comics. By the way, the pop-up in the beginning says that the homepage is for sale. But don't make a bid unless you're serious about it, because he will report all false bids to the police. :D
 

Tea

Storage? I am Storage!
Joined
Jan 15, 2002
Messages
3,749
Location
27a No Fixed Address, Oz.
Website
www.redhill.net.au
webingo: Makes me cry -- I could easily do a better job.

I don't doubt it for an instant, Buck. Hell, there are green things in my fridge that are better at writing web pages than Webingo is. The real question is ... how could you do a worse job?

I think you could, as I have faith in you, but you'd have to put some genuine thought and effort into it.

PS: my eyes hurt, so I tried looking at it using VIEW - SOURCE. Now my brain hurtz.
 
Top