Written by Philip
|
< Previous
|
Next >
|
|---|
A HTML Element is the data in between the start and end tag, or the opening and closing tag, depending on what you call it! The HTML Element is the part of the HTML that, most of the time, is displayed to the user.
Example 1
<p>Hello Super HTML World!</p>
In the code above the text ‘Hello Super HTML World’ would be the HTML Element.
Example 2
<div>Lets Dance</div>
In this code ‘Lets Dance’ would be the HTML element.
HTML Elements within other HTML Elements?
Placing a HTML Element inside another HTML Element is called nesting. In nearly all the code you create you will have one HTML Element inside another.
Example
<html> <body> <p>Hello Super HTML World!</p> </body> </html>
In the example above the <p> element, with it’s ending tag, is nested in <body></body> and <body></body> is nested in <html></html>
Remember to always close your start tag! For stuff like break line <br>
Which currently does not require an end tag it is worth placing </br> as well.
Use lowercase for keywords in tags, ie. <div> not <DIV> as W3C recommends
Lowercase in HTML 4.
| Related Articles | Link |
| W3C HTML 4 Specification | http://www.w3.org/TR/REC-html40/ |
|
< Previous
|
Next >
|
|---|