We've all probably learnt in our school computer lessons, in the fifth or sixth grade, what HTML stood for. And from the very begging it was made very clear to us that knowing HTML was to build websites. And it is 100% true. The language that web browsers understand is HTML. Now a days, some browsers do provide some added functionality but that's not what browsers were meant to do. Browsers are nothing but HTML compilers. Let's take a look at two very basic HTML5 programs.
You might have a question like why HTML5, why not preceding versions? In web design, knowing the latest version of a language is better that knowing the preceding versions because:
1) The latest versions retain all the essential features of the previous versions.
2) They have extra packages that are completely new and were not available in the earlier editions
3) Web Designing is a very competitive field and to survive, you must be familiar with the latest tools available and implement them accordingly
Note: Comments in HTML are placed between <!-- and -->
<!Doctype html>
<!-- Doctype html is a very important statement. This tells the browser that the Document is in HTML 5 and to parse it accordingly -->
<html>
<head>
<title>Hi</title>
</head>
<body>
<p>Hi</p>
</body>
</html>
Now, this is a complete code, All it will do is, print Hi on the webpage, when you open it with your browser. As you may have noticed, there is distinct pattern of enclosed bound in HTML. Almost every segment starts with a <heading> and ends with <\heading>. This is the equivalent of parenthesis in HTML. We must lace every code with <html> and <\html>. Although not mandatory, it is a good practice. Next we have the head, and the title, This obviously becomes the title of the Page.
Then comes the body of the code or webpage, bounded by ,<body> and </body>.
Then you'll see <p> </p>. This is used to create a certain block. What it actually, means we'll learn later. Here, we have enclosed The String Hi. And this is what we'll see on our webpage.
We'll come back with more in HTML5 in the next article. We are aware that it's too short, and should've included one more example perhaps, but time constraints limit us. Practice this code and writing other stuff on your webpage till then. Just remember that you can place the stuff to appear on your screen anywhere between <body> </body> . and the browser will display it.
This is the output that the code will give. Just notice the Current tab option of the browser. It's displaying Hi, which is our Title. Thus, anything placed between <title> </title> becomes the web page's title.
You might have a question like why HTML5, why not preceding versions? In web design, knowing the latest version of a language is better that knowing the preceding versions because:
1) The latest versions retain all the essential features of the previous versions.
2) They have extra packages that are completely new and were not available in the earlier editions
3) Web Designing is a very competitive field and to survive, you must be familiar with the latest tools available and implement them accordingly
Note: Comments in HTML are placed between <!-- and -->
<!Doctype html>
<!-- Doctype html is a very important statement. This tells the browser that the Document is in HTML 5 and to parse it accordingly -->
<html>
<head>
<title>Hi</title>
</head>
<body>
<p>Hi</p>
</body>
</html>
Now, this is a complete code, All it will do is, print Hi on the webpage, when you open it with your browser. As you may have noticed, there is distinct pattern of enclosed bound in HTML. Almost every segment starts with a <heading> and ends with <\heading>. This is the equivalent of parenthesis in HTML. We must lace every code with <html> and <\html>. Although not mandatory, it is a good practice. Next we have the head, and the title, This obviously becomes the title of the Page.
Then comes the body of the code or webpage, bounded by ,<body> and </body>.
Then you'll see <p> </p>. This is used to create a certain block. What it actually, means we'll learn later. Here, we have enclosed The String Hi. And this is what we'll see on our webpage.
We'll come back with more in HTML5 in the next article. We are aware that it's too short, and should've included one more example perhaps, but time constraints limit us. Practice this code and writing other stuff on your webpage till then. Just remember that you can place the stuff to appear on your screen anywhere between <body> </body> . and the browser will display it.
This is the output that the code will give. Just notice the Current tab option of the browser. It's displaying Hi, which is our Title. Thus, anything placed between <title> </title> becomes the web page's title.

No comments:
Post a Comment