The most basic and popular coding language is HTML, and this is what I will be covering in my discussion. Although it is the simplest, it is also the base for all websites. CSS is just a development of HTML, and JavaScript needs to be called through HTML. So this is what I will be discussing.
Coding is very much like programming. Although basic HTML makes use of basic pair tags, the more advanced JavaScript is very similar to the programming of older programs such as Turbo Pascal. It is very mathematical, and needs alternatives to an initial command. It is very complicated, an area even I have not yet been brave enough to tread through, but that’s a glimpse.
Let me start off by trying to explain a basic set of HTML code. Have a look at the example below (please note: this use of code is pretty outdated because of CSS, but one needs to understand this before covering CSS):
<p align="center">
<font color="#0000FF" face="Georgia, Times New Roman, Times, serif" size="4">
<b>
Hello! Isn't code beautiful?</b>
</font>
</p>The above code decoded, would be out put like this:
Hello! Isn't code beautiful?
Wasn’t that simple? Let me break down what you see into English Terms.
Basically, all the coding is contained within tags. Tags are the < and > that surround the command. For every opening tag, you need a closing tag. So, if you look at the example above, we tell the program to centre whatever we want. We open it by saying <p align="center"> and when we are done, we close it with </p> (The 'p' stands for 'paragraph', and we want it 'center') Anything after a = sign, must be enclosed within ", such as URL's, colours, etc. (Please note, coding uses American spelling, in center and color.)
In this simple piece of code, I just wanted to make a simple sentence a bit prettier. (Default colour is black and default font is Times New Roman – yuck!). I called the font commands through the <font> tag. I called a colour for the font (in Hex code (#0000FF or a type of blue), same as that in Photoshop and Illustrator), I then gave it a size (default goes according to points, so 4 points), and gave it a font face (Georgia – the fonts that follow are just in case the user doesn’t have the assigned font on their computer). I then closed the whole tag with a simple </font>. If you look before this, there is a <b> thrown in. This simply made the text bold. (For interest’s sake, you can underline text with <u> and make it italic with <i>).
And just like that, we have made a simple piece of code and output it on screens for people to understand and enjoy. That is a very basic and very simple look into the world of coding of websites. Once you can grasp the basic fundamentals, it is very easy to learn and understand the more advanced HTML and CSS.
No comments:
Post a Comment