HTML (Chapter 2) Contd..
Learning New each day! Moving ahead
every day!
Over the
years, several versions of HTML have been released but undoubtedly, the basics
of HTML remain the same. The basic structure and the sequence of tags remain the same.
Any HTML
document starts and ends with opening <HTML> and closing </HTML>
tags.
You may
write thousands or millions of sentences or attributes in your HTML document,
But this remains the same-
<HTML>……</HTML>
And the whole document comes in between.
Now, just
after the opening <HTML> tag comes the opening and closing <head> tags which contain all the non-visual elements of the Html
document.
It looks
like this-
<HTML>
<head>…..</head>
</HTML>
And now, the
head tag is followed by the opening and closing <body> tags.
The body
tags contain all the visual-structural
elements of the html document such as the paragraphs, headings, quotes, lists, images, links, and many more.
Now the
structure looks like this-
<html>
<head>…..</head>
<body>….</body>
</html>
The body tag contains the main
content of the HTML document.
We use the
<p> or the paragraph tags inside the body tags itself.
Now, let us take our first example
for the HTML document:
After
writing the HTML document, we will be saving it using the extension ‘.html’
I have saved
my document as “mydocument.html”. You may give it any name of your choice, just
remember to add the extension ‘.html’.
Now, you may
Search your document in the search box or from the main menu of the notepad. Now,
we will open the document by clicking the ‘Enter’ button or the cursor.
Now, we will
be directed to the browser page where we have saved our Html document. Like
here, my default web browser is ‘Firefox’. So, my file will open on the Firefox
web page itself.
And hence,
you may see the output in the figure below:
Well here as
you can see, the page has the title “My First Document” on the top left corner
of the web page.
And whatever the sentence we had written inside the body tag, is displayed right on the screen
of the web page! It is written- “This is the first paragraph”.
Hope there
are no issues till here. It is super easy! Just stay tuned.





Comments
Post a Comment