8.10.1 Web Design - Webpage Elements f1
8.10.1 Web Design - Webpage Elements f1
Web elements are used to create the structure of a web page and
are used to present information in various ways.
They are also known as HTML elements.
Some of the most common web page elements you will encounter
include:
Links
Paragraphs
Headings
Numbered and bulleted lists
Tables
Regions
Images
Form controls including radio buttons, edit fields, check boxes, combo
boxes, list boxes, and buttons
Each element is defined by a start tag, some content, and an end tag as
below.
<tagname>Content goes here...</tagname>
Examples of some HTML elements:
<h1>My First Heading</h1>
<p>My first paragraph.</p>
Note:
The HTML element is everything from the start tag to the end tag.
Some HTML elements have no content (like the <br> element). These
elements are called empty elements. Empty elements do not have an
end tag.
HTML element
The <html> element is the root element and it defines the whole HTML
document. It has a start tag <html> and an end tag </html>.
Then, inside the <html> element there is a <body> element:
<body>
</body>
BODY ELEMENT
The <body> element defines the document’s body. It has a start tag <body>
and at the end tag </body>.
Then, inside the <body> element there are two other elements: <h1> and
<p>:
<h1>My First Heading</h1>
<p>My first paragraph.</p>
The <h1> element defines a heading.
It has a start tag <h1> and an end tag </h1>:
<h1>My First Heading</h1>
The <p> element defines a paragraph.
NOTE:
Never Skip the End Tag.
Some HTML elements will display correctly, even if you forget the end tag:
Example
<html>
<body>
<p>This is a paragraph
<p>This is a paragraph
</body>
</html>