HTML ELEMENTS
Drillz
Agenda
• Introduction
• Examples of some HTML elements
• Nested HTML elements
• Summary
• HTML Tag Reference
HTML
ELEMENTS
2
Introduction
When it comes to HTML elements, you need to first know that
a HTML element is defined by an opening tag, some content,
and a closing tag.
HTML
ELEMENTS
3
Primary goals
To know what HTML tags can do and how to use them while
creating a web page.
• Examples of some HTML elements
HTML
ELEMENTS
5
Opening Tag Element Content Closing Tag
<h1> My First Heading </h1>
<p> My first paragraph </p>
<br> none none
Some HTML elements have no
content (like the <br> element).
These elements are called
empty elements. Empty
elements do not have a closing
tag!
HTML
ELEMENTS
6
Nested HTML elements
PRESENTATION TITLE
7
HTML elements can be nested (this means that elements
can contain other elements).
All HTML documents consist of nested HTML elements.
Examples Of Nested HTML Elements
PRESENTATION
TITLE
8
EXAMPLE
RESULT
Example Explained
HTML
ELEMENTS
9
The <html> element is the root element, and it defines the whole HTML document.
It has a opening tag <html> and a closing tag </html>.
Then, inside the <html> element there is a <body> element:
<body>
<h1>My First Heading</h1>
<p>My first paragraph. </p>
</body>
The <body> element defines the document's body.
It has an opening tag <body> and a closing tag </body>.
Then, inside the <body> element there are two other elements: <h1> and <p>:
EXAMPLE EXPLAINED CONTD.
HTML
ELEMENTS
10
<h1>My First Heading</h1>
<p>My first paragraph. </p>
The <h1> element defines a heading.
It has a opening tag <h1> and a closing tag </h1>
<h1>My First Heading</h1>
The <p> element defines a paragraph.
It has an opening tag <p> and a closing tag </p>:
<p>My first paragraph. </p>
Never Skip the End Tag
PRESENTATION TITLE 11
Some HTML elements will display correctly, even if you forget
the end tag
However, never rely on this! Unexpected results and
errors may occur if you forget the end tag!
Empty HTML Elements
PRESENTATION TITLE 12
HTML elements with no content are called empty elements.
The <br> tag defines a line break, and is an empty element
without a closing tag
HTML tags are not case sensitive: <P> means the same as <p>.
The HTML standard does not require lowercase tags, but W3C
recommends lowercase in HTML, and demands lowercase for stricter
document types like XHTML.
Summary
A HTML element is defined by an opening tag, some content, and a
closing tag. HTML elements can be nested (this means that elements can
contain other elements).HTML tags are not case sensitive. Some HTML
elements will display correctly, even if you forget the end tag.
HTML
ELEMENTS
13
Thank you
Drillz
xdrillz3@gmail.com

A BRIEF EXPLANATION ABOUT HTML ELEMENTS AND USES

  • 1.
  • 2.
    Agenda • Introduction • Examplesof some HTML elements • Nested HTML elements • Summary • HTML Tag Reference HTML ELEMENTS 2
  • 3.
    Introduction When it comesto HTML elements, you need to first know that a HTML element is defined by an opening tag, some content, and a closing tag. HTML ELEMENTS 3
  • 4.
    Primary goals To knowwhat HTML tags can do and how to use them while creating a web page.
  • 5.
    • Examples ofsome HTML elements HTML ELEMENTS 5 Opening Tag Element Content Closing Tag <h1> My First Heading </h1> <p> My first paragraph </p> <br> none none
  • 6.
    Some HTML elementshave no content (like the <br> element). These elements are called empty elements. Empty elements do not have a closing tag! HTML ELEMENTS 6
  • 7.
    Nested HTML elements PRESENTATIONTITLE 7 HTML elements can be nested (this means that elements can contain other elements). All HTML documents consist of nested HTML elements.
  • 8.
    Examples Of NestedHTML Elements PRESENTATION TITLE 8 EXAMPLE RESULT
  • 9.
    Example Explained HTML ELEMENTS 9 The <html>element is the root element, and it defines the whole HTML document. It has a opening tag <html> and a closing tag </html>. Then, inside the <html> element there is a <body> element: <body> <h1>My First Heading</h1> <p>My first paragraph. </p> </body> The <body> element defines the document's body. It has an opening tag <body> and a closing tag </body>. Then, inside the <body> element there are two other elements: <h1> and <p>:
  • 10.
    EXAMPLE EXPLAINED CONTD. HTML ELEMENTS 10 <h1>MyFirst Heading</h1> <p>My first paragraph. </p> The <h1> element defines a heading. It has a opening tag <h1> and a closing tag </h1> <h1>My First Heading</h1> The <p> element defines a paragraph. It has an opening tag <p> and a closing tag </p>: <p>My first paragraph. </p>
  • 11.
    Never Skip theEnd Tag PRESENTATION TITLE 11 Some HTML elements will display correctly, even if you forget the end tag However, never rely on this! Unexpected results and errors may occur if you forget the end tag!
  • 12.
    Empty HTML Elements PRESENTATIONTITLE 12 HTML elements with no content are called empty elements. The <br> tag defines a line break, and is an empty element without a closing tag HTML tags are not case sensitive: <P> means the same as <p>. The HTML standard does not require lowercase tags, but W3C recommends lowercase in HTML, and demands lowercase for stricter document types like XHTML.
  • 13.
    Summary A HTML elementis defined by an opening tag, some content, and a closing tag. HTML elements can be nested (this means that elements can contain other elements).HTML tags are not case sensitive. Some HTML elements will display correctly, even if you forget the end tag. HTML ELEMENTS 13
  • 14.