Coding for Beginners

A basic knowledge of coding is a handy tool to have in your arsenal if you are in the business of writing for the web; even though it is only for your own blog. You may not aspire to become a software architect; but, if your job entails posting articles to blogs or websites, knowing a bit of coding helps you tweak or take care of minor formatting errors. Coding is fairly simple once you understand the syntax or its grammar.

At one time, the Internet was merely used for exchanging files. However, the play field today is much more advanced with a lot of multi-media elements like audio and video thrown in; and HTML 5, a wonderful improvement to earlier versions of HTML supports the integration of these new entrants.

coding

What You Need To Get Started

All you need to get started is a browser like Google Chrome or Internet Explorer for testing the efficacy of the code you write; a text editor for writing the code – Notepad++ is as good as any; and of course an inquisitive mind.

Definitions of Frequently Used Terms

Tags – is the command within a HTML document that tells you exactly what the specific part of the document is about. For instance, we have here a title tag <title> enclosed in angular brackets.

Element – in the example below, the content, ‘blog article’ prefixed by a start tag or an opening tag and suffixed by an end tag or closing tag.

blog article

The content and tags are together referred to as element.

Notice the forward slash in the end tag (</h1>), since this is like punctuation in language. If you forget this, you’ll keep getting an error message when you run the code. While most elements have start and end tags, some don’t; an example of this is
which indicates a line break. Obviously when an element does not have an end tag, it also does not have content.

Attribute – when you need to add more information to an element, you use an attribute that come in what is called ‘name/value’ pairs; for instance,

blog article

, where ‘id’ is the name of the attribute and ‘main’ is the value assigned to that name. The attribute is always specified within the opening tag; and in HTML5, whether or not the value is written within quotes is left to the personal choice of the person writing the code.

General Writing Format

When you see a sample HTML document, you’ll notice quite a few indents and on closer observation, you will detect a pattern to it. While indents not really necessary, everyone uses them because when you write several pages of code, they make reading and editing codes and identifying bugs easier.

Saving and Viewing your Code

After you are done with writing the code for your webpage, you’ll want to check what the page would look like. For this, you need a browser and if you are seriously interested in coding, use the fastest fibre broadband for a better user experience; but first save the document with an .html extension. Now, use windows explorer to locate your file and double-click on it to view it in whichever browser you use.