Basic HTML Elements 1.2

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

SBI

Lesson 2
Basic HTML Elements

Computer 9 Prepared by: MJ Fernandez

1
*Information & Images taken from various sites on the internet and is under OER Commons.
Objectives
At the end of the lesson, you should be able to:

1 Understand what a doctype declaration is,

2 Know the necessary tags to start creating a web page.

SBIS 2
*Information & Images taken from various sites on the internet and is under OER Commons.
HTML

HTML (Hypertext Markup Language) is the code that is


used to structure a web page and its content. For
example, content could be structured within a set of
paragraphs, a list of bulleted points, or using images and
data tables. As the title suggests, this article will give you
a basic understanding of HTML and its functions.

SBIS
4
*Information & Images taken from various sites on the internet and is under OER Commons.
SBI
S

1
Basic Elements

SBIS5
*Information & Images taken from various sites on the internet and is under OER Commons.
HTML <!DOCTYPE> Declaration

The <!DOCTYPE> declaration represents the document type, and helps


browsers to display web pages correctly.

It must only appear once, at the top of the page (before any HTML tags).

The <!DOCTYPE> declaration is not case sensitive.

The <!DOCTYPE> declaration for HTML5 is:

SBIS
HTML <!DOCTYPE> Declaration

Look at our table of all HTML elements, and what Doctype each
element appears in.

Tip: The <!DOCTYPE>


declaration is NOT
case sensitive.

SBIS
HTML Documents

All HTML documents must start with a document type declaration:


<!DOCTYPE html>.

The HTML document itself begins with <html> and ends with </html>.

The visible part of the HTML document is between <body> and


</body>.

SBIS
9
*Information & Images taken from various sites on the internet and is under OER Commons.
HTML Documents: Main root

HTML Elements

The <html> HTML element represents the root (top-level element) of


an HTML document, so it is also referred to as the root element. All
other elements must be descendants of this 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>.

SBIS
HTML Documents: Document metadata

The <head> HTML element contains machine-readable information


(metadata) about the document, like its title, scripts, and style sheets.

The <meta> HTML element represents Metadata that cannot be


represented by other HTML meta-related elements, like base, link,
script, style or title.

The <title> HTML element defines the document's title that is shown
in a Browser's title bar or a page's tab. It only contains text; tags
within the element are ignored.
SBIS
HTML Documents: Sectioning root

The <body> HTML element represents the content of an HTML


document. There can be only one <body> element in a document.

SBIS
13
*Information & Images taken from various sites on the internet and is under OER Commons.
Key points

1. Doctype declaration
2. Html, head, title, meta and body Elements

SBIS
References:

https://developer.mozilla.org/en-US/docs/Web/HTML/Element
https://www.w3schools.com/tags/tag_doctype.asp
https://www.w3schools.com/html/html_intro.asp

SBIS

You might also like