Learning HTML Basics
Where do you type HTML code?
HTML code is entered into a text editor. The same type of program that is used for editing and saving regular text files.
Getting a HTML Editor is one of the first tasks. Luckily, not only there are many free choices available online, basic text editors come preinstalled with most Operating Systems. Chances are you already have one installed on your computer.
In order to start writing HTML you will need something to edit your HTML code in and save it to hard drive. This is done using a regular text editor software program.
Later on you may wish to download an advanced HTML code editor (sometimes known as IDE or Integrated Development Environment), but because you're just starting to learn HTML, it is best done using a basic text editor.
Whether you are on a Mac or a PC, these text editors are already installed on your computer. I have written another article about the basics of HTML text editors and how to use them. This link is in particular useful if you are starting from absolute scratch, and don't know where to begin.
Opening and Viewing HTML code of any Website
One of the useful ways to learn HTML is to see how other websites were created. In fact, you can open and read the HTML source code for a large majority of websites in a web browser of your choice. The controls to do this are only slightly different for each browser. Most popular browsers are Internet Explorer, Chrome, Firefox and Safari.
Go to the website of interest and right click anywhere on the blank space of the page (anywhere but on an image for example). Also try to avoid clicking on hyperlinks (that might open the wrong menu). On the pop up menu select an appropriate option to view the HTML source code. These options are depicted on the images above for each of the 3 popular browsers: Safari (Mac OSX, Internet Explorer and Firefox) and it’s pretty much the same in Google Chrome.
While viewing the source code, use the Ctrl-F key combination on your keyboard to open up a search box, available in many modern browsers. By typing in text you saw on the website, and pressing the Enter key or clicking on the search button you can easily locate the HTML code surrounding that part of the website.
Remember that most HTML code is simply a collection of tags used in a specific order to achieve a particular effect.
When looking at HTML code from other websites, it is likely that you will see many DIV and SPAN tags. The P tag stands for "paragraph" and should be used around blocks of text containing one or more sentences. These tags are the very building blocks of a web page.
Don't be discouraged by the overwhelming number of tags and tag combinations when viewing source code of other web sites. Creating an elaborate website takes time, most of these tags were created during a long period of time that mostly focus on adding detail and creating very specific things to pre-existing layouts. However, not all websites must have a large number of HTML tags and it's possible to create an entire website using just a few of these tags.
The order in which tags appear will have an effect on how the browser will render it on the screen. By learning HTML tags and learning how to structure your HTML code you will be effectively creating entire web pages from start to finish.
Now that you understand the basics of opening and viewing HTML source code from other websites, proceed to study the basic HTML tags in the next section.