SQL For Beginner

Thursday, June 28, 2018

Create a web page using HTML

HELLO FRIENDS !!!  Welcome to your 2nd tutorial on beginning of HTML.


Q. How to create a web page using HTML?

As i said in my previous introductory blog on HTML, all you need is notepad, so you should go ahead and open up notepad & that's all you need to follow this tutorial.

Now, Web browsers display a lot of different documents, its not only HTML. So the very first thing we have to do is, tell the  browser what type of file this is and we do that by using the document type declaration .
Its just a declaration and we are telling the browser exactly what to show here and so lets go ahead & type in doc type HTML, so the browser moves in top-down manner.


(1)


We are going to use HTML 5.2 (most current version). If the version changes in future, you won't need to come back here & change this, because we are using very current version & this code will still be relevant.






Now the very first thing that comes after the doc type declaration is the HTML element.We create that by typing HTML and then as i said in my first tutorial, every opening tag has a closing tag. 


(2)

Now its more like a wrapper, where we put all of our code into and that is everything in our document we'll go between this HTML element opening tag & closing tag. 

Its just like a starting and ending point that tells the browser where the HTML starts and where the HTML ends.








After this first section we need that comes after HTML is called as head section.
as you know, we need a head tag and a closing tag.


(3)

In this section contains the lot of info about the page itself.
This is not a huge & critical section you need to be concerned about.

The title of the page, that's actully the only thing that you display here that goes in the top menu.
Title element is what shows up in the title bar of the web browser.








Now, lets move on to the body section which come after the head section and this is where all of the action takes place.
This is really the heart of your web page and it needs also a closing tag as well. 

This is the primary section of your web page, it all happens in the body section. Everything that's displayed to the user will be done  within the body element. 

Now we need to insert something within our body tags. We are just gonna insert some simple headings & some simple texts.

First thing we need is heading and we use the H tag for that and its h1 and then we are gonna close that tag as well. It creates larger text because this is gonna identify a section of our website. 

So that's the text for our header and all the text will be contained in there for our header.




Now, we need to tell what this website about and so lets use the P element and what the P element does is it creates a paragraph & obviously it stands for Paragraph. So anything that we want to tell that we put in a paragraph.

(5)
Now lets go ahead and render this and see how these headers and paragraphs are displayed in our first web page.
Go ahead & save the file. ( Ex. My web page.html )
After this double click on that file & there you see we have our first web page.

(THIS IS HOW OUR WEB SITE LOOKS)

This is just an example of web page, from next tutorial we are going to know many more HTML tags. I hope you get the idea of how the basic structure works in HTML.
If you can understand this structure, you will surely understand the HTML.

so that's it for this tutorial.


Note :- As you can see in image our h1 tag is in largest text, with the use of number of h1, h2, h3 etc tags size gets smaller. Later on we can also learn about the font size.

No comments:

Post a Comment