Archive

Posts Tagged ‘html’

What is html, where do I buy one, and do I need one anyway?

July 28th, 2009 chris No comments

If you are going to build a website you need to know a little about html (hyper text markup language). For a web browser (i.e. Internet Explorer, Mozilla, Chrome, etc) to know how to display a web page it uses a language called html. This language describes what the web page will look like and then the browser uses that information to display everything.

Here is a little bit of html (that displays an image in a page):

<img src=”whereTheImageIs” border=”0″ alt=”this text shows when images are turned off in the browser” />

An html file is just a simple text file with the html code written in it.

Thankfully there are standards for html so that everyone who builds a browser can make sure that the websites all display in the way they were intended to. Anyone who has ever built a website will know that the last sentence was ironic. Browser developers don’t always agree with the standards and so they build things a little differently. Not long ago it seemed that Microsoft has gone it alone and intended to use html that no one else was using but this seems to have been pretty much ironed out now. Anyway these browser wars have resulted in a problem for web builders because we now have to check our pages in as many browsers as we can because they all do something a little different.

I’m going to say a quick word about CSS here. CSS – which stands for Couldn’t Standardise Sheets (actually it stands for Cascading Style Sheets) is a way to remove the formatting from the layout of a webpage. What this means is that you tell your CSS what font you want to use and then if you want to change the font you just edit the style sheet and the whole site picks up the change. It can also be used for layout. On the surface it sounds brilliant but in usage it is complex beyond understanding. Browsers do all kinds of different things with CSS and to be honest its a nightmare. Although I should recommend using them you may find it easier to use other methods of laying out your webpage (most of us use a combination of layout techniques – but more of that another time).

In the good old days there was just simple HTML and it was all in capital letters. We jocks who started the Internet revolution (ah who can ever forget putting those first images on a web page – heady days indeed) used to write everything in plain old HTML. Then someone invented WYSIWYG web design and things got a whole lot easier. However to suit the new fangled browsers that could display images and the new web site building software HTML was expanded and improved. We have now reached the stage where we even had to add another letter to the name of the language (now whose living on the edge). So we now use XHTML and its now all in lowercase.

Don’t be put off by that new high tec X this isn’t a new freedom movement but is simply a slightly more developed form of HTML – I guess HTML as it probably should have been originally. XHTML is a form of XML (don’t worry about XML for now).

Essentially this means that all html tags now have to have a closing tag (a tag is what html uses to describe things, like the image tag shown above) and where html doesn’t have a closing tag we have to make the end of the tag look like this />

So here are a couple of tags:

<br> (html)  <br /> (xhtml) = line break

<p></p> (html and xhtml) = paragraph

<img> (html) <img /> (xhtml) = image tag

<a><a/>(html and xhtml) = link or anchor tag

Most of the time you won’t need to worry about html because your web design software will take care of it but it does help to have a little idea of what it’s all about so you can tweak things.

Categories: Getting started Tags: ,