Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HTML Elements
#1
HTML Element Syntax

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

HTML Document Example

[HTML]<html>

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

</html>[/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:

[HTML]<body>
<p>This is my first paragraph.</p>
</body>[/HTML]
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]<html>

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

</html>[/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).
Reply
#2
i guess you should upload zip files and there should be .html files inside that zip bundle
Reply
#3
ok admin g
Reply
#4
Nice pic dear member g.
Reply
#5
Is it really you?
Reply
#6
ya its my own picture You can find me on Facebook
Reply
#7
Ok good to know that where are you disappear now a days?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  HTML Introduction allahwahid 5 5,772 04-11-2013, 11:09 PM
Last Post: Vuhelper
  basic introduction to HTML 2012 Vuhelper 0 2,723 03-08-2012, 06:37 PM
Last Post: Vuhelper
  difference between <br> and <br \> in html and Xhtml Xpert 3 3,065 12-21-2011, 01:06 AM
Last Post: Xpert
  Use Lowercase Tags instead of Uppercsse in html for recommendation Xpert 0 2,646 10-04-2011, 08:07 PM
Last Post: Xpert
  Differences Between XHTML And HTML New updates June 2011 Vuhelper 0 2,667 05-27-2011, 03:36 AM
Last Post: Vuhelper
  div tag is used in html 2011 Vuhelper 0 2,760 05-27-2011, 03:29 AM
Last Post: Vuhelper
  what are the latest updates for html May 2011 Vuhelper 0 2,929 05-25-2011, 09:30 PM
Last Post: Vuhelper
  why html is important for students? do you have any idea? Xpert 0 2,883 04-29-2011, 02:44 PM
Last Post: Xpert
  HTML <img> Tag for html users 2011 Xpert 0 2,050 04-27-2011, 11:54 PM
Last Post: Xpert
  HTML course for Pakistani students Xpert 2 3,152 01-09-2011, 05:03 AM
Last Post: Xpert

Forum Jump:


Users browsing this thread: 1 Guest(s)