• There is no such big difference between HTML
and HTM.
• The only difference between HTML and HTM is
one letter only
• Earlier operating systems were not so powerful
and capable of taking a four-letter word as an
extension, so HTM found its existence.
Types of Tags
Container Tags
Non-container or Empty Tags
An empty tag consists of single tag like “<br/>”.
The ending slash is no longer required in HTML5.
TASK :HTML with Paragraphs and Line Breaks
Discuss (Browser ignoring ling endings and number of spaces
between words )
TASK :HTML with Paragraphs and Line Breaks
Discuss (Browser ignoring ling endings and number of spaces
between words )
TASK : Organizing Content with Headings
Discuss various headings
Structuring An HTML Document
Building Blocks of HTML
An HTML document consist of its basic building blocks which are:
Building Blocks of HTML
Tags: An HTML tag surrounds the content and apply meaning to
it. It is written between < and > brackets.
Attribute: An attribute in HTML provides extra information about
the element, and it is applied within the start tag. An HTML
attribute contains two fields: name & value
Elements: An HTML element is an individual component of an
HTML file. In an HTML file, everything written within tags are
termed as HTML elements.
TASK : Attribute
Type Discuss
Structuring An HTML Document
<html lang=“en”>
Structuring An HTML Document
• The HTML lang attribute helps search engines like Google,
Bing, Yandex, and others to return language-specific results
• If you have several versions of a webpage for different regions or
languages, you should inform the search engines about these
versions.
Structuring An HTML Document
HTML Semantic Elements
TASK : Semantic HTML
Type Discuss <section> tag
Structuring An HTML Document
• A semantic
element clearly
describes its meaning
to both the browser
and the developer.
• Examples of non-
semantic elements:
<div> and <span> - Tells
nothing about its
content.
• Examples of semantic
elements: <form> ,
<table> , and <article>
- Clearly defines its
content.
Structuring An HTML Document
Why Use Semantic Tags
• To provide additional information about that
document by defining the layout and sections of
the webpage.
• Semantic tags help screen readers understand the
content better
• Help browsers interpret the content more easily
Structuring An HTML Document
Some common HTML Semantic
Elements
Structuring An HTML Document
• Defines a section in a document.
• A web page could normally be split into sections for introduction,
content, and contact information.
Structuring An HTML Document
• specifies independent, self-contained content.
• Used in Forum Posts, Product Cards, Newspaper Articles, User
Comments etc
Structuring An HTML Document
• represents a container for introductory content or a set of
navigational links.
• Can contain header tags (<h1>..<h6>), logo or icon, navigational links