Saturday, 20 April 2013

Website Authoring: HTML, XHTML & Screen Readers!!

HTML
Okay so what actually is HTML? HTML stands for HyperText Mark-up Language, which is... You guessed it, a mark-up language.

The way that HTML works is by using mark-up tags which are defined by your greater than and less than brackets (< >) which have some sort of text inside it that define how a website should be displayed. When there are two types of tags, an open (<b>) and a closed tag (</b>) this is defined by using a forward slash to close it. I'm first going to list a few tags for you and then tell you what each means.

  • <html> - This tag starts off a HTML page, the content between the <html> and </html> (remember opened and closed) describes how a website should look.
  • <body> - This is the start of to the body tag, the content between these tags are the parts that are displayed in a browser, again you need to close this at the end with a </body> tag.
  • <p> - This tag is called a paragraph tag, this defines the start of a paragraph in a block of text and the end of the paragraph is defined by closing the tag using the </p> tag.
  • <b> - An example I used above to show opened and closed tags, this tag means Bold, the text between the opened and closed tags will be Bolded like this.
When you're writing HTML it doesn't really matter what case you write it in, so it could be Uppercase or Lowercase or even a mix of the two.

XHTML
Okay so HTML is not the only way to code websites, you can use a combination of XML and HTML. This is called XHTML, which stands for Extensible HyperText Mark-up Language. XHTML is a more stricter and cleaner format of HTML and is supported by all new browsers.

It basically uses the same principles of HTML but creates more effective website. When using XML it's used to describe a website, but when using HTML it's used to display a website. XHTML is used to let users create their own custom tags which will make it easier to separate it from other default tags. 

All XHTML elements must be properly nested, which means that if you're opening more than one tag, you have to close them in order, so the first you opened has to be closed first and then the second tag.

Example:
<phonebook>
 <number>
 <name>
 </name>
 </number>
</phonebook>
All of the elements that you write in XHTML need to be closed, again in order. Also the elements that you do write, need to be in lowercase to be able to be read by the browser.

After you have finished writing your XHTML code you'll need to make sure that it is compatible with all browsers. To do this you can send it to a Screen Reader which checks over all of the code and makes sure that it works with all the browsers and then you will get a certificate stating that it is compatible and gone the checking process.

No comments:

Post a Comment