You need a text editor to start coding in HTML you can use any editor even windows default Notepad.
Tags which we are gonna work with today are:
- <Head>
- <Title>
- <Body>
- <p>
- <h1> to <h6>
- <!-- Comment tag -->
- <br>
1st of all let’s open your notepad.
And type the code given below. and save the file as "filename.html"
In the images above we started our code with <HTML> Tags which represents HTML language.
Then there are <Head> Tags what head tags do, they contains your web page Title, CSS and Scripts as you can see in between head tags there is title. This title show on the TAB of your web page as shown in the image.
<Body> Tags are the main section or you can say your web page's all the data which users see on their browser screen is written in body section.
The very next Tag is Heading tag, there are 6 types of Heading Tags which starts from number 1 and goes on to 6. These numbers decides the size of the heading.
Paragraph we write a paragraph in between <p></p> Tags.
You might be wondering what these <!-- --> Tags do. Actually these are comment tags, comments don’t do any thing whatever you write it will not show up in your browser. Comments are useful like when you are writing a very long code or code for someone else then you can use comments to explain what the code is about.Now if you go to the location where you save your HTML file you can see that it's icon is like your default windows browser. I saved my file as "practice.html".
Now as you can see the headings there size gets smaller as we increase the number, so hope this clears the concept of heading.
You can also see that the comment section of the code is not showing.
Now what about <br> Tag, this tag has no closing tag it is used to put a line break as you can see that our paragraph is written in a single straight line in the output but in the code we write it in two lines.
So you have to tell your browser that you need to put a line break and start a new line. here is how you can use <br> tag.
Output
Now you can see we have 3 lines.
That's it for today if you have any questions regarding this tutorial you can ask in comment or you can mail us.A piece of advise: Don't just copy paste and follow what others write now you know something and it's time for you to use it your own way.