HTML Element

The Tag...


<html></html>

As in most all markup languages the tag defines an element in the language. That element is the markup that carries data. The data could be in the element or as attributes to the element. In either case the element is there to carry data. That's what elements do.

Inside the document... of whatever markup language... the element or tag can be identified by its special characters. Since HTML was originally based on SGML the special characters are angle brackets (<>)... a.k.a. less than (<) and greater than (>) signs.

So a basic HTML tag looks like this:

<html>

In the strictest sense HTML tags always come in pairs. Therefore, the HTML element has two tags... one to open the element and one to close it with the data between them. Yes... there are situations when you don't have to close a tag... but that's not in the strictest sense.

So the element with both it's tags looks like this:

CREATED 2020-09-20 05:28:58.0

010-00-03-1B

UPDATED 2020-09-20 05:29:18.0

The Attributes


<p id="myElement"    class="htmlElement"    title="This is my element."    style="color:red;">       This is my paragraph.    </p>

As in all things computer... you have to be able to customize it... and we do that through the use of Parameters. Parameters in markup comes in the form of attributes.

Attributes allow us to customize an element. For example... put you mouse over this button:

Here is another example...






It will render like this (put your cursor over it)...

This is my paragraph.

CREATED 2020-09-20 06:18:42.0

010-00-03-1C

UPDATED 2020-09-20 06:18:53.0

The Empty Element


<input type="text" value="First Name">

Some elements don't need a closing tag. These elements are empty or self closing. They are empty because the data is being carried in the attributes.

The input tag is a perfect example of this...

CREATED 2020-09-20 07:37:27.0

010-00-03-1D

UPDATED 2020-09-20 07:43:34.0

L
I
N
K
S

DBID: db.wam

Page Server: Ithica

©2019 Leistware.com
        Hello anonymous