In this session, let us see the basic formatting tags of HTML. I have listed out few tags over here, B is for voice strong, again it is for bold. The only difference between these two is the second one will be recognized by the search engine. So the second one is a preferred way for converting your content into bold is for atomic use for underline and heading tags from h1 to h6 try to relate the tags similar to the formatting that happens in Microsoft Word like b i you hatred patient to hit six. All these are available in Word similar to that these are our tags in HTML. headshot is for horizontal lines.
This is an empty tag so you are adding a slash immediately. We are used for giving a line break. Please use for paragraph three is used for adding your formatted text now Let us see an example of working with this formatting tab. Let me go back to sublime I have created basic dot html I need the HTML basic template, so angle bracket HTML enter. So the template has come Let me add few HTML code and then I will explain how this is getting transformed are rendered in the browser. Now I have added the code Let me explain in line number seven I have added Hello after that I have added the br tag This is an empty tag so I have added a slash even without a slash this will work fine in the next night I've got Have a good day.
If you don't give a big tax everything will be rendered in the same night. So we are used for giving a line break then after Have a good day I don't have a big tax. So this will come to HTML will be rendered next to have a good day in italic format. After that, of course, you know this h1 to h6 and these are all headings and then I got strong the content which is render I mean added within strong will be shown in the form of bold. Then let me come to the screen tab in whichever format you are giving as such it will be rendered in the browser. So, the space everything will be preserved in the browser.
Let us see the output. So I need to save this how to run it right click open in browser. Now you can see the output I have shown the browser and the Sublime Text side by side. first line Hello is getting rendered then have a good day is getting printed in the next slide. The reason is you have added a br tag after Have a good day you don't have a br tag. So welcome to HTML is getting rendered in the same line in an invalid format.
After that, all the headings are getting printed. Then learning HTML is easy. is shown in bold format. After that, I have got this free tack whatever is Added within free is shown assets, the whitespace that everything is getting preserved. Now what happens if I remove this three tags? Let us see the output.
I am removing the street tag. I'm saving this. Let me come back I will refresh. The page is getting reload. Now see the output because you don't have a break. Everything is getting printed in the same line.
So please use for formatted text. Now let me just add this again. Okay, what if I want to comment? What is the syntax for adding an HTML comment? It is angled bracket exclamatory Mark hyphen hyphen, and your T ended with a hyphen hyphen angle bracket. So the first line is getting commented.
Okay how to do it in Sublime Text. Select this line, shift control, forward slash shift control forward slashes used for commenting Under comment of HTML is angle bracket exclamatory Mark hyphen hyphen, ending it with a hyphen hyphen angled bracket Okay, let me come to the top here again I've got Hello after that I've got Have a good day. Now what if I want to have this Welcome to HTML in the next slide, I need to use a br tag it is not mandatory that you need to use a slash without that also this will be rendered properly. So you can see welcome HTML is getting rendered in the next line and the okay how to add a paragraph. So, let me add a paragraph starting with P ending P and you need to add the content inside this. So, let me add some content.
Now I have got a p tag with some content within it. Let me save this I will execute. Now we can see the paragraph also is getting rendered. I will remove this three tag, comment on Whenever you are doing any modification the HTML page, you can save this and come and reload it in the browser automatically to show the output. This is about the formatting tags of HTML. In the next session, let us learn how to add an image to a web page.
Thank you