html elements html tags vs html elements what is the difference between html tag and html element
In This article we will discuss about html elements html tags vs html elements and what is the difference between html tag and html element we will also discuss why we use html elements and html tags what is purpose of using html tags and elements. we will also discuss the complete syntax of these topics.
First we understand HTML elements
HTML Elements
An element is basically defined as starting tag in HTML. if some time the element contain some content it ends with closing tag. End tag must have forward slash which shows here is ending point of any element.
There are some examples of HTML Elements
- <p> This is a paragraph </p>
- <h1> This is Heading </h1>
- <div> this is division of content on screen in html </div>
These are the elements which have ending point with forward slash there are also some single elements For example <img> tag has no ending point <br> is also an other example singular element.
These elements are also called void elements.
Basically in HTML documents, these elements specify how HTML document should be build what kind of documents should be placed.
There are also some types of HTML elements in HTML5
Outer elements ( about which we have discussed
Nested elements
HTML nested elements
When ever we put an element with in elements is called nested elements it usually used in HTML5
There is a practical example of nested element.
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>Html Elements and types of Elements </title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel='stylesheet' type='text/css' media='screen' href='main.css'>
<script src='main.js'></script>
</head>
<body>
<h1>This is <i>italic </i>Heading </h1>
<h2> <u> This is under line </u> Heading </h2>
<p> This is bold <b> paragraph</b></p>
</body>
</html>
OUTPUT
This is italic Heading
This is under line Heading
This is bold paragraph
In above example we have used three nested elements. these elements are used when ever we want to aluminate some part of line or a paragraph .
So here is our topic Thanks for reading hope will meet in next article with new interesting Topic
Like Post share with friends are supports my blog
html elements html tags vs html elements what is the difference between html tag and html element |
No comments:
Post a Comment