Web Basics

From iGeek
Jump to: navigation, search
WWWIcon.png

Have you ever wondered how the Web works? The majority of the Internet and computers are actually very simple to understand. The jargon and alphabet soup (acronyms) only make it sound more mysterious and complex than it really is. This article covers the basics of what happens when you go to a website.

Basics

Basically, how a website works is that anyone can create a file, and then they put that file where others can read it.

An "html" file (which stands for HyperText Markup Langauge) allows a special kind of program (called a Web-Browser) to read that file, interpret it and display the results. A web "site" is nothing but a place that has a bunch of these files that other people can use their browsers to read.

Much of an HTML file is text (the stuff for users to read), but some of it is special "tags" which the browser reads. Those tags tell the browser how to display the text; it gives it format information, like the color, type style, position, or tells the browser about another file that you can display (like a picture, movie, sound), or "link" to.

Over time, they added some scripting, so that you can actually have a page do some things by itself (run small programs that are self contained).

A link is just a pointer to another file, so that a user can "click" on the link, and the browser goes to (reads) that new file. In fact, that's where the term "hyper-text" comes from, it means that you can jump from one text file to another with a link (hyperlink) -- by clicking on certain highlighted words or images.

A simple HTML could look as follows:

<HTML> 

<HEAD> 
   <TITLE>Test</TITLE> 
</HEAD>

<BODY> 
   <P>Hello, I am a sample file</P> 
   <P><A HREF="http://www.yahoo.com">Goto:Yahoo</A><P> 
</BODY> 

</HTML>

Which looks like a bunch of gobbledy-gook, but is really pretty simple.

  • Tags are "commands" for the browser to read, and are surrounded by "<>".
  • Tags come in pairs with a beginning and ending tag like <HTML> and </HTML> telling the browser this is the start of the hyper-text, and the end.
  • There's the page title "Test", which is in the pages heading;
  • Then the body.
  • <P></P> is the start and end of a paragraph; and the content of paragraphs are shown to users (for you to read).
  • Then there's another paragraph with the <a ...> and </A> tag; whatever is between these tags becomes a hyperlink to another webpage, and the content of the tag 'HREF="..."' tells the link where it should go when clicked on.

So in this case, the browser will show a page with the title of "test", a paragraph that says, "Hello I am a sample file". And then another paragraph that is a link that says "Goto:Yahoo", and would take you to www.yahoo.com if you clicked on it.

That's all there is to HTML and the web files.

There are a lot more tags, with tables and images and colors, fonts and styles and so on; but already you understand the basics of how it all works. You just tag elements of text, with what they are for.

If you create a site that has a few pages of information in them that you find valuable - then other people may link (point) to your pages because they like what you had to say and want others to find it as well. And you can put links to related pages and sites, and soon the whole mess will be interconnected into a big "world-wide-web" of files and information.


Networking : Bots, Crawlers and Spiders, oh my!CookiesEMailNetwork Casting and SubnetsNever trust the InternetWeb Search BasicsWhat is DNS?What is a WebApp?

Written 2002.03.11