![]() |
How to Start Programming in HTML. |
This tutorial has been designed for beginners, who have never written an HTML document by hand and need to know where and how to do it. In summary, this document will show the process of creating an HTML file.
TABLE OF CONTENTS
CONSIDERATIONS
An HTML document, even when written in a structured way that conforms to the language standard, is nothing more than a simple sequence of characters that can be found on any normal keyboard. In favor of portability, these characters are normally stored in files, as is the case with many other types of information.
A file that contains an HTML document can have many extensions. In fact, it can have any extension you can think of, but if you give your document the "wrong" extension it might not be interpreted the way you want (like an HTML document ). So the two extensions that will normally be interpreted as HTML documents are "htm" and "HTML". The difference between using one or the other of these extensions is only one letter (the "HTML" extension was not supported by old operating systems, which are no longer used today), so you can use them as you prefer.
You may find on some occasions when browsing the web, that the URL in your browser, corresponding to the document you are currently viewing, has an extension such as "PHP", "asp", "pl" or "cfm" (sometimes in a row by the question mark "?" and much more). Even though files with these extensions are associated with different languages on the server-side, when they reach the client side they are nothing more than HTML documents. This is so because these files originally contain server-side scripts that are processed every time someone requests them and are transformed into normal HTML documents, before being sent.
PRACTICE
Once you have decided which extension to use, you can choose a name for your file and create it. The file creation process is rather simple and involves knowledge about your operating system. Operating systems may differ in the way users can create a file, but never too much. In the next paragraph, I will show the process of creating a file in Windows 8, and let you figure out how to do it in other operating systems.
We will create a file on the desktop, as this is just an example, but you can consider a neat structure later, as you will see in the "Organizing a website" tutorial. The first step is to right-click on any clean area of the desktop and select, from the contextual menu that will be displayed, "New" and then "Text document". This will create a text file and automatically allow you to enter a name. There you put the chosen file name and extension, which in this example will be "example.html".
Now that the file has been created, you are ready to start writing your document: choose a common text editor and open your file. Any modern operating system provides common text editors that you can use to write your documents. In this example, we will use Windows Notepad but you can use or install other more specialized editors, such as Notepad ++ or Geany (both are free).
Avoid using rich text editors, such as "WordPad" or "Word", for the production of your documents. If you want to use them anyway, remember to save your files only in plain text format.
Open your file by right-clicking on it and selecting, in the contextual menu that will appear, "Open with" and then "Notepad". At this point, you are ready to start writing your web page.
To see your document rendered, just save it and open it in a web browser. In most modern operating systems you can open the document with the default web browser by double-clicking on the file icon. Once open, the changes you make to your document can be updated in the browser by simply reloading the page.
This tutorial has given you the basic knowledge to handle the files of a website. Now you are ready to start writing your documents. The following tutorial, " HTML Tags and Attributes " will introduce you to the basic components of an HTML document. Do not miss it!
Must Read, HTML Articles
What are HTML Tags and Attributes?
The Structure of the HTML Document.
Grouping and Content structure in HTML
0 Comments