![]() |
|
|||||||
| Register | FAQ | Members List | Downloads | Calendar | Today's Posts | Search | Webmaster Resources | Webmaster Blogs |
![]() UK Web Hosting |
![]() Website Hosting |
![]() UK One Way |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Foreword
This mini-tutorial is intended to get you started in writing HTML documents. It does not cover *all* the areas of HTML as a language, nor it's intended to do so. It contains some basic information that you will need in order to start writing your own HTML webpages. HTML is an easy to learn language, but it contains a considerably large set of language-specific elements that do not make the subject of this tutorial. I will, however, provide some helpful links at the end to make up for that. What is HTML ? HTML (or HyperText Markup Language) is the universal language for publishing text-based information on the World Wide Web. It is a simple, non-proprietary standard developed by the people at W3C (http://www.w3.org), that you can use to build up a webpage. Everytime you open up your web browser (Internet Explorer, Netscape, Mozilla, Opera, just to name a few) and surf the internet, you are looking at HTML files. They are associated with the .htm, .html or .shtml extensions and are text files that you can create / edit using simple text editors, like Notepad, Wordpad etc, or more sophisticated authoring tools like MS Frontpage, Macromedia Dreamweaver. The last ones are great, helpful tools for beginners but the downside there is that they do most of the job for you, so if you intend to learn HTML or are curious about what's behind a browser-viewed webpage, like the one you're looking at right now, I recommend you start writing your own HTML code using a simple text editor, like Notepad, to name probably the most popular one (between Windows platform users). The structure of an HTML file Like I said earlier, html files are *always* text files. HTML is a descriptive language, meaning that when you create an html file, you indicate where and how to display a certain piece of information in the context of your webpage, and then the browser will do that for you. The way you indicate these things is through the use of tags. You could consider tags as a sort of containers, that finally put together, build up your webpage. A tag is made up of an identifier enclosed in angle brackets, for example <title>. As I said earlier, tags could be considered as containers for information. That is, almost every tag consists of an opening tag, like <title> mentioned earlier, and a closing tag, which is exactly like the opening tag, except you have to insert a slash ("/") before the text identifier, e.g. </title>. The information enclosed between the two tags is known as the tag content, for example "<title>My web page</title>" would set the webpage's title to "My web page". Said "almost" because there are tags which do not have a closing tag, e.g. "<br/>" which introduces a line break. Every html page should have the following general structure: Code:
<html> <head> <!-- header contents --> </head> <body> <!-- body contents --> </body> </html> The <head> tag denotes the header section of the HTML document. This is usually where you put descriptive information about the current page. One of the most common tags that you can find inside the header is <title>, which sets the webpage's title. The <body> tag represents the starting point of the actual document contents to be rendered inside the web browser. The <!-- and --> tags enclose user comments. They will not be displayed when the page is rendered, but are used to place comments about various sections of code. Tips: 1) Never forget to close an open tag! This is one of the most common mistakes found when writing HTML. To prevent this, when you begin a new tag, put down the matching closing tag right after it, then begin writing other relevant information between the two, like this: Step 1) write the opening tag (in this case a paragraph delimiter) and its matching closing tag Code:
<p></p> Code:
<p> <!-- write here paragraph contents --> </p> Code:
Your name: <input type="text" name="myNameInput"/><br/> 2) When you write an HTML document, indent its contents properly. Don't worry, all browsers ignore white spaces (enter, space, tab) at rendering time. You'll find this to be invaluable if you have to edit its contents later on. It's always nicer to have a well-formed, organized code that you can easily go through and modify where needed, than a bulk text file without a clear structure. A closer look to tags Earlier I was defining tags as being made of a text identifier enclosed in angle brackets. But later on, I wrote an example tag like this: Code:
<input type="text" name="myNameInput"/> Code:
Your occupation: <input type="radio" name="myInput2" checked/> Programmer <input type="radio" name="myInput2"/> Other Well, ok, but what exactly is the use of attributes? An attribute is used to either define some behaviour of its parent tag or store some information about it. For example, in the above declaration, the name attribute would set the input tag's name to "myInput2", so it could be properly identified later on to have its value retrieved in a form submission scenario. Or if we wanted to define a link to a website, we would write something like this: Code:
<a href="http://forums.ukwebmasterworld.com/index.php">UK Webmaster World website</a> Well, this is all I could think of right now, hope this was helpful for someone... Of course, one important thing that's missing here is the HTML vocabulary. Now you know what to do, but you don't know how to do it. But as I said earlier, the list is pretty big, so I won't get into it here. Here's a useful link in that direction: http://www.willcam.com/cmat/html/crossname.html. Even with this at hand, you'll still be up for a slow start, so here's a tip: look over some already made HTML code and try to analyze the tags' effects on the same page, but viewed in a browser. If you can't find any .html files, just browse a regular page on your browser, and click View -> Source (in Internet Explorer). If you have questions, please go ahead, I'll try to help anyway I can. |
![]() |
| Bookmarks |
| Webmaster Resources |
| UK Web Hosting UK WW SEO Tools Free site submission Web Directory |
| Advertisement |
![]() |
| Site Of the Month |
![]() Nominate site of the month |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Quick Web Index - Open for submission | deluxdon | Directories | 11 | 08-27-2007 01:11 PM |
| Quick Money In Affiliate Marketing | marketraise int | Generating revenue from your website | 0 | 03-20-2007 07:38 AM |
| Quick Reply Mod | Duke | General Webmaster Talk | 8 | 03-28-2005 02:18 AM |
| Quick Reply | Duke | General Webmaster Talk | 0 | 03-24-2005 11:46 AM |
| Beginners Guide - Complete List of HTML Tags. | JC1o1 | General Webmaster Talk | 2 | 02-09-2005 03:19 AM |
| UK Webmaster World Forums - Internet marketing, web development, domain names, SEO contest and discussuons. |
| Subscribe to our feeds |