Thursday, 14 November 2013

The basics of HTML

In this blog I will be teaching you the very basics of HTML such as creating the HTML document and adding a title, heading and a paragraph. To demonstrate on how to use these basic skills I will use notepad to create the html document.
To create your HTML document you will need to open notepad and type in "<!DOCTYPE>". After that press enter to start a new line on notepad. On this line type in "<html>". The reason we do this is to let notepad understand that this document type will be html which is how you first start off your html document.



Ok, now that you have started your html document you're going to need actually put something into this document so you can start a website. The things that I'll be showing you that you can put into the document will be a title for your webpage, a heading and a paragraph.


To add a title to your html document/ webpage start a new line on notepad and then (this will be the name of the webpage that will show up on the 'tab' for the webpage) you will simply need to add the sign "<title>". Once you have typed that in you can then proceed to type in the title of your webpage, for example; "<title> my first webpage </title>". you may have noticed that after I typed in the title for the webpage I then added "</title>. The reason for this is because it is to cancel the "<title>" command. We want to cancel the title command because if we didn't then everything you proceed to type in to notepad will just add to the title of your webpage which is what we don't want to happen.


Seeing that you have learnt how to title your webpage it's time to start adding headings and paragraphs. There are 6 different types of headings in html that we use. These are all different sizes ranging from <h1></h1> to <h6></h6> with <h1></h1> being the largest type of heading and <h6></h6> being the smallest. Now, to add your heading start a new line on notepad and type in "<h1> [whatever you wish to have as your heading"] </h1>. Yet again, you will notice that you must cancel your headings once you have typed your heading in to prevent your entire web page from being one large heading.

Once you have inserted your heading we can move on to adding paragraphs to your html document. To do this you simply need to start a new line and type in "<p>[type in whatever you wish to say in your paragraph]</p>" and there you have it, you have added a whole paragraph to your html document. You may have noticed, yet again, that we close our paragraphs with "</p>" because it then allows us to add new paragraphs and headings without it messing up this paragraph and the entire html document.



Now that you have added in your header and paragraph to your html document you can now close the document with </html>. What this will do is end the document and let it know that you have finished your html document. Once you have done that, all you need to do is save your notepad file. This part is very important because you need to save your file and rename it so that it ends with ".html". This means that the document has been saved in a html format. In order to view your html document on the internet all you need to do is open up your web browser and then click and drag the document on the web browser and you can then view it.





 Once the notepad document has been saved as .html you can view it on the internet like so.