HTML is simply a language that allow you to categorize the information in a web page. It provide the information with meaning and structure. <head> </head> has the meaning of header information.
<p><a href="www.google.com"> Link! </a></p>, this provides structure that the link is inside the <p> tag and hence it is a paragraph..
<html>
<head>
<title>Hello World</title>
</head>
<body>
<h1> Kiss you Goodbye</h1>
</body>
</html>
The code above wrap the text/data/information "Hello World" into the <head> tag and <title> tag so the computer know what this information is about.
<tag> is the start of the tag, </tag> is the end of the tag. We need those special syntax because there is a need for the computer to know when certain item start and when it stops.
*If you want to assign attribute to a tag, use this syntax <a href="www.google.com">Link</a>
- This tell the computer that the link will bring you to Google website.
Syntax of a html tag
<a href="www.google.com"> link </a>
Purpose of Tag
- We need the html tag because we can specifically target them in CSS and javascript
<p> I am here </p>
p {
color: red;
}
This will cause all paragraph elements to be red colored.
- We need the tag because we can assign class to it. Like so <p class="para"> I am here </p>
<p><a href="www.google.com"> Link! </a></p>, this provides structure that the link is inside the <p> tag and hence it is a paragraph..
<html>
<head>
<title>Hello World</title>
</head>
<body>
<h1> Kiss you Goodbye</h1>
</body>
</html>
The code above wrap the text/data/information "Hello World" into the <head> tag and <title> tag so the computer know what this information is about.
<tag> is the start of the tag, </tag> is the end of the tag. We need those special syntax because there is a need for the computer to know when certain item start and when it stops.
*If you want to assign attribute to a tag, use this syntax <a href="www.google.com">Link</a>
- This tell the computer that the link will bring you to Google website.
Syntax of a html tag
<a href="www.google.com"> link </a>
Purpose of Tag
- We need the html tag because we can specifically target them in CSS and javascript
<p> I am here </p>
p {
color: red;
}
This will cause all paragraph elements to be red colored.
- We need the tag because we can assign class to it. Like so <p class="para"> I am here </p>
Comments
Post a Comment