In this session, let us see a simple example of using HTML. Already we have created this demo dot html. Now, let us add the coding. What is the first line in any HTML page to specify to the browser that this is a html5 document, you need this doctype so it is angled bracket exclamation mark doctype space HTML then you need to add the HTML tag. This is the root tag of any HTML page within which you will have a head start. Inside the head, you need to have the title.
Already we have discussed this head can have few titles tags like meta script style, because we are not going to do any styling or scripting as of now we just need the title part. I have given this tighter. Next to the head, we need to add a body tag. inside the body tag, we have to write the content. Since we are not seeing any formatting tags, let me add a simple content. Hello World.
Welcome to HTML. Now I'm saving this, how to run this file, open this page in the browser, because this will be saved in the browser with the browser icon only. Let me show you that. So this is the HTML file folder which I have got wherein we are saved demo dot html, you can see that it is having the browser icon. So directly, you can open it when you double click automatically it will open in the corresponding browser. I have got chrome so it'll open in Chrome.
Are you come to sublime in sublime Right click open in browser. Click that you could see the title of Pacific a simple example. And you got the output hello world and welcome to HTML. Let me minimize the size of the browser. Now I have got the browser and Sublime Text side by side. Our demo dot html file is shown over here and output is shown in the browser.
The title is shown as a simple example. And output gets rendered properly in the browser hello world and welcome to HTML. But if you see in your HTML file, you have written hello world in one line and welcome to HTML in the next line. You are given a line break into html5 but the browser will not take any line breaks. If you want to give a line break then you need to go in for this BR tag br will give a line break and it will come to the next line automatically. So you will be learning about much more tags like VR and how to use the basic format tags like Bold, Italic and heading.
In the next session, like to specify about the HTML part here, I have written all the coding by myself, What if they want to have the basic template for that, I will just tell you a shortcut, I will remove the complete coding. I have collected the code, let me delete. Now just do angle bracket HTML and press enter. Automatically you will get the template. Now I will minimize this here. I will just change the title to basic demo.
And here. Have a good day. I'm saving this. I'll come back to the browser. I don't have to say right click open in browser. Let me read reload the page directly.
Now we can see the output output get changed in the browser. On the top you can see basic demo and it is rendering out what else have a good day. So you can have your browser Your Sublime Text side by side and you can work very easily. So this is all about how to create a simple example using HTML. In the next session, let us see the basic formatting tags of HTML. Thank you.