The Basics of HTML

Uncategorised • 22nd Jul, 15

 
 

A language which was created for use when it comes to web browsers such as Google Chrome, the purpose of HTML is to share with the web browser what you would like it to do.  First things first though, you’ll need to understand how it works.

To get started it simple, all that you have to do is right click on your desktop and choose New > Text document.  Once you’ve done this, rename it to webpage.html which will open into your web browser.  In order to edit this you will need to open it in notepad and not your browser.  An example of an HTML tag looks something like this:

<p> This is a paragraph </p>

This is then meant to be interpreted by a web browser which is why you will need to describe everything that is on the page, which the browser will then be able to display.  You can even make use of this technique in order to describe headings along with other things too.  There are, however, a few golden rules when it comes to HTML.  Always keep in mind that every element has both an opening and a closing tag, and you should never forget to close a tag which you have opened in the same order.  If you want to bold any of your words all you have to do is:

<p> This is my <strong>favourite sentence<strong></p> 

 

If you think you’re ready to create your first HTML page, type the following into notepad:

<html>

<head>

<title>My first try</title>

</head>

<body>

<h1>Hey</h1>

<p>This is going great so far!</p>

</body>

</html>

Once you’ve saved this and refreshed your browser, you should be looking at this:

Hey

This is going great so far!

So, what do all of these tags actually do?  You’ll notice the order in which the tags above have been opened and closed, with the whole document being wrapped with the correct <html> tags.  This tells the browser that everything within those tags is HTML code.  The <head> tag will not display anything on your screen, but rather store information on what the page is actually about.  With the <title> tag being displayed right at the top of the page, this is the most important part of info which will be in the head section.  The content which you wish to display on the screen will be placed within the <body> tags.  The main headings should be marked with <h1> followed by subheadings of <h2> and so on. 

And that’s that ladies and gentleman!  You now know how to make your very own webpage – best of luck and we hope that it’s a success now that you know the basics of HTML.

  

 

Back to Blog