How web pages work.

How Web pages work

By crafter | crafters loft | 13 Dec 2019


Of all computing technologies, web pages are probably the most interacted with today The Internet has grown in leaps and bounds over the past two decades. Many of us spend a significant part of  our day interacting would some website.

Not many of us have ever wondered exactly how web pages work. Well, not until it does not work as  expected, do we take a few moments to think about how it all fits  together. You will be amazed by simple web pages technolgy actually is.

To understand Web pages it's perhaps easier to understand what a Web browser is. A Web browser is a file viewer. Consider a photo image file you may have on your disk. An image exist as a file on your computer as a collection of zeroes and ones put together in some way. Try to view the file in a simple editor like a text editor and you will see a complex mess of letters numbers and symbols.  However, That same photo viewed in an image viewer is a beautiful picture containing a special memories.

Word processor files are another example.  When viewed in your favorite word processor the file displays your document with all the  Formatting you expect. However the same fun viewed in your image viewer is an unrecognizable mess.

Web pages work in the same way. A web file contains information that a web viewer can make sense of and render a  beautifull page for you. This is an example of an encoded web page.

351665157-3bcf44b5e4768c398c5512139d0c52bb116d294f3dac53d0a39ed73f6073eaf0.png

The one difference between a word processor file and a web page is that a word processor file is encoded in a way that is not readable by humans.  Web pages, however are designed to be readable by humans.

Web pages works on a system of tag pairs that instruct a browser how to handle information inside the tags.

A web page is recognizable by a pair of tags at the top and bottom of each page telling the browser that the file is a web page.

 

《html》

《header》

   ...

《/header》

《body》

   ...contents...

《/body》

《/html》

 

When a file with the above tags s opened by a browser, it knows how to handle the rest of the file. You can see also that the page consists of a header section and body section.

To change the title of the web page, add a title tag to the header.

You then then add to your page as required.

 

《html》

《header》

     《title》Welcome to my home page.《/title》

《/header》

《body》

      《h1》This is a level 1 heading《h1》

    《h2》This is a level 2 heading《h2》

    《p》This is a paragraph of text with some 《b》bold text《/b》.《/p>

《/body》

《/html》

You can copy the text into a file and view the pages in a web browser to see the effect

Web pages if today can be quite complex. But they still follow the general rules of tags outlined here. Keeping to the rules and learning new tags will set you on the path of learning how to code web pages.

How do you rate this article?

0



crafters loft
crafters loft

Crafter's Loft is a collection of thought invoking, sometimes light hearted honest-to-goodness discussions.

Publish0x

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.