If the HTML as a house, then the elements can be regarded as a blank room, attributes can be regarded as fine decoration, by CSS and JS implementation
1. Elements:
HTML pages are actually text files made up of many different HTML elements, and any Web browser can run HTML files directly. So it can be said that HTML elements are the basic objects that make up HTML files, HTML elements can be said to be a generic. HTML elements are defined by using HTML tags.
2. Tags:
tags are
tags are used to tag HTML elements. The text that is between the start and end tags is the content of the HTML element.
3.
Property:
The HTML attribute that provides various additional information for an HTML element is always in the form of a name value pair called property name = attribute value, and the property is always defined in the start tag of the HTML element.
Example:
<
html
>
<
head
> <
title
>示例标题</
title
> </
head
>
<
body
bgcolor
=
"red"
>
<
p
>这是示例页面</
p
>
</
body
>
</
html
>
|
In this example,<p> this is the example page </p> is the HTML element, where "This is the sample page" is the concrete content of the element.
The bgcolor= "Red" in Bgcolor= "Red" is the attribute of the tag, and it defines how the label should be specifically configured.
In short, the difference between the element and the label does not have to care too much, the actual work we are directly labeled collectively. And the property is easy to understand, it is to add a variety of additional information for HTML tags or configuration options parameters
HTML TAG Structure Summary