PDA

View Full Version : HTML Elements



allahwahid
04-27-2011, 02:29 PM
HTML Element Syntax

A
n HTML element starts with a start tag / opening tag
An HTML element ends with an end tag / closing tag
The element content is everything between the start and the end tag
Some HTML elements have empty content
Empty elements are closed in the start tag
Most HTML elements can have attributes


HTML Document Example


<html>

<body>
<p>This is a paragraph.</p>
</body>

</html>
HTML Example Explained

The <p> element:

<p>This is my first paragraph.</p>
The <p> element defines a paragraph in the HTML document.
The element has a start tag <p> and an end tag </p>.
The element content is: This is my first paragraph.

The <body> element:


<body>
<p>This is my first paragraph.</p>
</body>
The <body> element defines the body of the HTML document.
The element has a start tag <body> and an end tag </body>.
The element content is another HTML element (a p element).

The <html> element:


<html>

<body>
<p>This is my first paragraph.</p>
</body>

</html>
The <html> element defines the whole HTML document.
The element has a start tag <html> and an end tag </html>.
The element content is another HTML element (the body element).

Don't Forget the End Tag

Some HTML elements might display correctly even if you forget the end tag:

<p>This is a paragraph
<p>This is a paragraph
The example above works in most browsers, because the closing tag is considered optional.

Never rely on this. Many HTML elements will produce unexpected results and/or errors if you forget the end tag .

Empty HTML Elements

HTML elements with no content are called empty elements.

<br> is an empty element without a closing tag (the <br> tag use for line break).

Xpert
04-27-2011, 03:36 PM
i guess you should upload zip files and there should be .html files inside that zip bundle

allahwahid
04-28-2011, 03:11 AM
ok admin g

Xpert
04-28-2011, 03:35 AM
Nice pic dear member g.

Xpert
04-28-2011, 03:36 AM
Is it really you?

allahwahid
04-29-2011, 12:48 AM
ya its my own picture You can find me on Facebook

Xpert
10-04-2011, 07:16 PM
Ok good to know that where are you disappear now a days?