03. A simple example

4 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
This is a free item
$0.00
د.إ0.00
Kz0.00
ARS$0.00
A$0.00
৳0.00
Лв0.00
Bs0.00
B$0.00
P0.00
CA$0.00
CHF 0.00
CLP$0.00
CN¥0.00
COP$0.00
₡0.00
Kč0.00
DKK kr0.00
RD$0.00
DA0.00
E£0.00
ብር0.00
€0.00
FJ$0.00
£0.00
Q0.00
GY$0.00
HK$0.00
L0.00
Ft0.00
₪0.00
₹0.00
ISK kr0.00
¥0.00
KSh0.00
₩0.00
DH0.00
L0.00
ден0.00
MOP$0.00
MX$0.00
RM0.00
N$0.00
₦0.00
C$0.00
NOK kr0.00
रु0.00
NZ$0.00
S/0.00
K0.00
₱0.00
₨0.00
zł0.00
₲0.00
L0.00
QR0.00
SAR0.00
SEK kr0.00
S$0.00
฿0.00
₺0.00
$U0.00
R0.00
ZK0.00
Already have an account? Log In

Transcript

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.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.