Thursday, March 28, 2019

HTML: Basics Part-II


HTML: Basics  Part-II

Basic HTML Document

Below mentioned are the basic HTML tags which divides the whole document into various parts like head, body etc.
·         Every HTML document begins with a HTML document tag. Although this is not mandatory but it is a good convention to start the document with this below mentioned tag:
<!DOCTYPE html>
·         <html> : Every HTML code must be enclosed between basic HTML tags. It begins with <html> and ends with </html> tag.
·         <head> : The head tag comes next which contains all the header information of the web page or document like the title of the page and other miscellaneous information. These information are enclosed within head tag which opens with <head> and ends with </head>. The contents of this tag will be explained in the later posts of the course.
·         <title> : We can mention the title of a web page using the <title> tag. This is the header information and hence mentioned within the head tags. The tag begins with <title>and ends with </title>
·         <body> : Next step is the most important of all the tags we have learned so far. The body tag contains the actual body of the page which will be visible to all the users. This opens with <body> and ends with </body>. Every content enclosed within this tag will be shown on the web page, it can be writings or images or audios or videos or even links. We will see later in the upcoming posts how using various tags we may insert mentioned contents into our web pages.

The whole pattern of the code will look something like this:
<!DOCTYPE html>
<html>
<head>
                   <!-- Information about the page -->
                   <!--This is the comment tag-->
                    <title> SumProgs </title>
</head>
<body>
                   <!--Contents of the webpage-->
</body>
</html>
This code won’t display anything. It just shows the basic pattern of how to write the HTML code and will name the title of the page as SumProgs.

<! – – comment here – – > is the comment tag in HTML and HTML doesn’t reads the line present inside this tag. This tag is used for increasing the readability of code and for easy debugging.

In the upcoming post, the last part of the topic HTML: Basic, I would cover the basic writings tags that will be shown on the web page.

No comments:

Post a Comment