Bright Java Tutorial

is brought to you by DoITBright LLC


Writing Your First HTML

I am using a Windows 8 operating system so the instructions will be for that kind of environment. Open your Windows Explorer and choose a directory where you wish to create a folder to put your HTML files. I choose C:\BrightJavaTutorial. Then, I will create a directory here and name it as htmlPages. Open a text editor. You can simply use Notepad which comes with Windows. Then write the code as shown below.

       Hello world of HTML!
Then save your newly created HTML document as 'firstHtmlPage.html'. Make sure it has a .html file extension. Take a look at the screen capture on how I did it.

Save your document as HTML.

Now that you have saved the document, open it with your favorite browser. You may choose to use Internet Explorer or Google Chrome or Firefox.

Your First HTML page.

As you may have seen, the content of your page is simply 'Hello world of HTML!'. Let us go through our code. The first line of code is the <html> opening tag. It should always be matched with a </html> closing tag. This tag describes that everything inside this tag will be HTML code. On the second line of code, we used the <body> opening tag. As expected, it should always be matched with a </body> closing tag. Everything inside this tag is meant to be displayed on the browser or to put it simply, is the main content of our page. You may have also noticed that the order of the opening and closing of the tags are in the Last In - First Out order. It is also a good practice to introduce proper indentation for better code readability.