Html :
1)html stands for hypertext markup language.it is used to create body structure of a web page.
2)it was invented by tim berners lee,the current version of html is 5
structure of html:
<!doc type html>
<html>
<head>
</head>
<body>
</body>
</html>
line 1:
it is not a doctype of html.it represents declaration
whatever written in these code you are going to display that content in webpage with html5
version.
Head section:
head section is used to carry raw data in head section we are having 5 tags
1.meta ::
meta tag is used to provide search engine optimization
2.title::
title tag is used to give title to the webpage,by default it will display the document
<title>flipkart</title>
3.style:
style tag is used to provide styling for a webpage
<style>
h1{
color:red;
}
</style>
4.link:::
,link tag was used in two different ways
case1:it is used to give icon to a webpage.to give icon to a webpage we need to pass icon in
relation attribute
<link rel=”icon” href=”flipkart.png”>
href::
href stands for hyper reference we need to pass the file path in it,where dot represents current
folder and “\” represents files present inside the folder
5.script::
script tag is used to write javascript code
<script>
document.write(“hello world”);
</script>
Tags::
tags are predefined keywords to format html document
the tag is enclosed within angular brackets
<tagname>
there are two types of tags
1)paired tags
2)unpaired tags
1.paired tags::
paired tags consists of both open and closed tags
ex:<h1>_ hello world__</h1>
<h1>=opening tag
hello world=content
</h1>=closing tag
content =whatever written in between open and closing tag is called content
2)unpaired tags:
unpaired tags only have opening tag and tag doesnt have closing tag.
It also called as empty elements
ex:image and link tag
, <link ref=”icon” href=”___”>
multimedia tags:
multimedia tags are used to add media to the web page
there are 3types of multimedia tags
1)image:
<img src=” ”>
image tag is used to display the image in webpage
src stands for source
source represents from where we are getting the image
we need to pass the path of the image for source attribute
Alt attribute::
alt attributes stands for alternative message
it is used to display alternative message when the image is not loaded on the webpage.
<img.src=”./image file path” alt=”laoding…..!”>
2)audio:
audio tag is used to display the audio to the webpage
<audio src=” ”></audio>
controls is the manditory to display the audio controls
note:without controls it will not display the audio bar
<audio src=”.audio file path “controls></audio>
3)video:
video tag is used to display video in our webpage
controls are manditory in video tag also
without controls it will not display the video controls
instant it will display only the image
<video src”./video file path” controls height=”100%” width=”100px”></video>
*hyperlinks:
hyper links are links used to jump from one source to another source
hyper links can be achieve with the help of anchor tag
<a href=””></a>
1)html stands for hypertext markup language.it is used to create body structure of a web page.
2)it was invented by tim berners lee,the current version of html is 5
structure of html:
<!doc type html>
<html>
<head>
</head>
<body>
</body>
</html>
line 1:
it is not a doctype of html.it represents declaration
whatever written in these code you are going to display that content in webpage with html5
version.
Head section:
head section is used to carry raw data in head section we are having 5 tags
1.meta ::
meta tag is used to provide search engine optimization
2.title::
title tag is used to give title to the webpage,by default it will display the document
<title>flipkart</title>
3.style:
style tag is used to provide styling for a webpage
<style>
h1{
color:red;
}
</style>
4.link:::
,link tag was used in two different ways
case1:it is used to give icon to a webpage.to give icon to a webpage we need to pass icon in
relation attribute
<link rel=”icon” href=”flipkart.png”>
href::
href stands for hyper reference we need to pass the file path in it,where dot represents current
folder and “\” represents files present inside the folder
5.script::
script tag is used to write javascript code
<script>
document.write(“hello world”);
</script>
Tags::
tags are predefined keywords to format html document
the tag is enclosed within angular brackets
<tagname>
there are two types of tags
1)paired tags
2)unpaired tags
1.paired tags::
paired tags consists of both open and closed tags
ex:<h1>_ hello world__</h1>
<h1>=opening tag
hello world=content
</h1>=closing tag
content =whatever written in between open and closing tag is called content
2)unpaired tags:
unpaired tags only have opening tag and tag doesnt have closing tag.
It also called as empty elements
ex:image and link tag
, <link ref=”icon” href=”___”>
multimedia tags:
multimedia tags are used to add media to the web page
there are 3types of multimedia tags
1)image:
<img src=” ”>
image tag is used to display the image in webpage
src stands for source
source represents from where we are getting the image
we need to pass the path of the image for source attribute
Alt attribute::
alt attributes stands for alternative message
it is used to display alternative message when the image is not loaded on the webpage.
<img.src=”./image file path” alt=”laoding…..!”>
2)audio:
audio tag is used to display the audio to the webpage
<audio src=” ”></audio>
controls is the manditory to display the audio controls
note:without controls it will not display the audio bar
<audio src=”.audio file path “controls></audio>
3)video:
video tag is used to display video in our webpage
controls are manditory in video tag also
without controls it will not display the video controls
instant it will display only the image
<video src”./video file path” controls height=”100%” width=”100px”></video>
*hyperlinks:
hyper links are links used to jump from one source to another source
hyper links can be achieve with the help of anchor tag
<a href=””></a>