|
10/4 -
DIV Template
|
||
Basic HTML It’s now time to learn the very basics of HTML. However, to aid you when you come to learn XHTML; I’m going to cover the miniscule basics of XHTML as well. First of all; HTML is a website coding language which can only describe how your webpage looks. HTML cannot process elements on your webpage. If you’re looking for something that can; try PHP/MySQL, Perl, ASP. There’s quite a few out there. But, as a new webmaster or mistress, you'll be wanting to learn the basics first. That brings us to the coding language of HTML. First of all, we must learn how to set out our HTML Page. Here we go:
And that, ladies and gentlemen, is how you most basically set up a html page. But, of course, more codes will be needed. In between the <head> and </head> tags, you put the character encoding, page title, and most meta information; such as the copyright, description, scripts, and stylesheets. Most things placed in the "head" area will not show on-screen, although the elements place there may affect elements in the "body" area. Inbetween the <body> and </body> tags, we put the normal page coding. These are things such as the <strong>, <em> tags. Anything you put here will show up on the page. Tags displayed in the "body" area may be effected by things in the head area, such as stylesheets. The Rules of the TagThere are many things you must follow when coding in HTML. First of all, you must always close every tag you start. So, if you use <strong> you have to close it like this: </strong>. Not too hard, hey? Then, another XHTML rule is that all tags must be in lowercase. For example: <STRONG> Is incorrect, but will still work, and <strong> is correct. Text Tags
Text on a web page can be formatted in several different ways, but the most common way to format text is to bold,
italicise, or underline text. However, with the introduction of XHTML, there is a new way
to do all this, seeing as the old tags such as; "b", "u", and "i" are all outdated. The new tags are; <strong>, <em
, and <span style="text-decoration:underline;"><span> tags. Links & ImagesLinks or Hyperlinks, are very important in web design. Of course you need links to other pages of your site, otherwise people will get bored and leave almost immediately. To include a link, we use the following code: <a href="">Text</a>. In between the two double quotes ("), you place the URL of the page you wish to link to. Between the opening and closing tag, you place the text which you want the user to click on to take them to that page.
Images, on the other hand, use a very similar way to include themselves within web pages to links. They use this code: <img src="" />
So, we define it's an image we want to use via the "img" and then its URL in between the two double quotes ("). The forward slash afterwards
is to self close the element. Because in XHTML, you can leave a single tag open, and that include the "img" tag. Document TypesDocument types are little codes which go at the top of your document to tell the browser what language you'll be coding in. It might be HTML 4.1, or XHTML Strict. Document types are also referred to as "DTDs", and you'll need to pick one from this site. And that concludes the learnings of basic HTML/XHTML. |
||