Introduction to HTML

0

Hypertext markup language is a structural language for developing a web page. Although we need help of CSS and javascript for making the web page attractive and engaging. On this article we learn about the basics of HTML Structure and the important tags that will be necessary to know as a beginner.

First of all we need to load the extension of HTML page. The extension is .html. Usually the first page is named index.html. This is named so because the server usually assigns this name for the home page. We can change this name from the server side if required.

Let’s start with the basic HTML structure.

<html>

<head>

</head>
<body>
The content will be here.

</body>
</html>

 

In HTML page most of the tags have a starting tag and an ending tag. Here <html> is the starting tag of HTML page and </html> is the ending tag Of HTML page. <head> is the header part of the page which contains most of the information and summary of the page. In body part we put the contents of the webpage.

As we know HTML is the basic structural language of a web page, but it needs help to look good and active. We need help from other tags and some programming languages to make it good. These are CSS, Javascript and jQuery. These three things are as much important as HTML in web development. CSS is used for putting things on its place and javascript is required to put dynamic design or Make the page interactive.

CSS, the full from is cascade style sheet. We can put CSS under <head> tags. The starting tag for style sheet is <style> and ending tag is </style>. Also we can put the style sheet as an external file using link tag. The CSS file extension is .css. if we directly write the css with in html tag it will be like

<div style=”CSS will be here.”>

If we do not write the style within html tag then we have to declare either class name or id name. this will be like

<div class=”class name”>

or

<div id=”id name”>

Now we can put the CSS in the head tag. But we have to write all the cascade style within <style> tag. Here we have to call the class, id or tag name. This will be like

<style>

.classname{

CSS will be here.

}

#idname{

CSS will be here.

}

tag{

CSS will be here.

}

</style>

Also we can link a CSS external file using link tags like below

<link rel=”stylesheet” type=”text/css” href=”demo.css” >

We have one more ingredient to introduce here, JavaScript or jQuery. As we already know javascript and jquery used for making a website dynamic and interactive. The library of these programming languages can be put anywhere in the HTML file. But the best practice is to put the libraries in head tag. Also the programs that we write in a html page can make the page loading time slow. So most of the programs are declared at the end of the page, before </html> tag.

Now, before ending this article we need to know how we will write or link javascript into html page. The tags for adding script is <script></script>. If we want to link an external scripts then we can do it by the way shown below.

<script href=”demo.js”></script>

Otherwise we can write a javascript program anywhere within <script></script> tags.

In future articles we will learn more about these.

Leave A Reply

Your email address will not be published.