Radhika
Radhika
1
Applications of HTML
Web Development: HTML is the backbone of every
webpage. It structures the content and integrates
multimedia, hyperlinks, and more.
Web Applications: HTML, in combination with CSS and
JavaScript, powers complex web applications (e.g.,
Google Docs, Trello).
Emails: HTML emails use table-based layouts and
embedded media to deliver rich, interactive content.
Mobile App Development: HTML5 is used with
frameworks like PhoneGap to build mobile apps for iOS
and Android.
Limitations of HTML
No Logic or Functionality: HTML cannot handle
complex logic, interactivity, or dynamic content on its
own. It requires JavaScript for such tasks.
SEO Limitations: While HTML provides structure, it’s not
enough by itself for search engine optimization (SEO).
Proper metadata and content structuring, as well as
external SEO practices, are necessary.
Limited Styles: While HTML can handle basic styles via
the style attribute, it is typically complemented by CSS
for complex styling and layout.
HTML5: Enhancements and New
Features
HTML5 introduced several powerful features that improve
the structure and functionality of web pages, including:
Semantics: New tags like <article>, <footer>,
<header>, and <section> to improve the meaning of the
content.
Multimedia: <audio> and <video> tags for embedding
audio and video without plugins.
APIs: New APIs like Geolocation, Web Storage, and
Canvas allow for more dynamic content and interactive
websites.
HTML History
Currently, we are using HTML5, which is the latest and
most advanced version of HTML.
2
HTML was initially created by Tim Berners-Lee in 1991
as a way to share and structure documents on the web.
The first-ever version was HTML 1.0, a basic and limited
version. However, the first standardized version, HTML
2.0, was published in 1995, laying the foundation for web
development as we know it today.
Sample Program
<!DOCTYPE html>
<html>
<head>
<title>My First Webpage</title>
</head>
<body>
<h1>Welcome to My Webpage</h1>
<p>This is my first paragraph of text!</p>
</body>
</html>
Output:
3
In this example:
<!DOCTYPE html>: Declares the document type and
version (HTML5).
<html>: The root element that wraps all HTML content.
<head>: Contains meta-information about the webpage,
like the title.
<title>: Specifies the title of the webpage (appears in
the browser tab).
<body>: Contains the visible content of the webpage.
<h1>: Represents the main heading on the page
(“Welcome to My Webpage”).
<p>: Defines a paragraph of text (“This is my first
paragraph of text!”).
4
HTML Page Structure
The basic structure of an HTML page is shown below. It
contains the essential building-block elements (i.e. doctype
declaration, HTML, head, title, and body elements) upon
which all web pages are created.
Tag Description
6
Tag Description
HTML Attributes
Attributes provide additional information about an element.
They are placed inside the opening tag and are written as
name=”value”. Common attributes include class, id, href,
and src.
Example:
<a href="https://www.example.com">Visit Example</a>
href is an attribute of the <a> tag that defines the URL of
the link.
HTML Editors
An HTML Editor is a software application designed to help
users create and modify HTML code. It often includes
features like syntax highlighting, tag completion, and error
detection, which facilitate the coding process.
There are two main types of HTML editors:
1. Text-Based Editors – Allow direct coding with features
like syntax highlighting and code completion for full
control over the webpage structure. Example – Sublime
Text, Visual Studio Code, etc.
2. WYSIWYG (What You See Is What You Get) Editors –
Offer a graphical interface to design web pages visually,
automatically generating the corresponding HTML code.
Example – Adobe Dreamweaver, etc.
7
HTML Editors List
There are various free and paid HTML editors available in
the market, but in this article, we will be covering some
renowned free HTML editors that you can use as a beginner
or switch to if you are an experienced developer.
Table of Content
1. Notepad
2. Brackets
3. Sublime Text Editor
4. Atom
5. Visual Studio Code
1.Notepad
Notepad is a simple text editor that is also used to write
HTML code. It is an inbuilt desktop application available in
Windows OS.
2.Brackets
Brackets is an open-source software primarily used for Web
development. It provides live HTML, CSS, and JavaScript
editing functionality. Similar to the Notepad editor, create a
new file and save it with a .html extension to run the HTML
file.
3. Sublime Text Editor
Sublime is a cross-platform code editor tool. It supports all
markup languages and is used as an editor for HTML. Similar
to the Notepad editor, create a new file and save it with
a .html extension to run an HTML file.
4. Atom
Atom is an open-source code editor tool for MAC, Linux, and
Windows. We can use Atom to write and edit HTML
code. Similar to the Notepad editor, create a new file and
save it with a .html extension to run an HTML file.
5. Visual Studio Code
It is one of the most popular code editors of today’s
generation. Many companies and software developers prefer
this online HTML code editor.
8
HTML Editors Comparsion
Ideal For Pros Cons
No advanced
Pre-installed, simple to features like syntax
Beginners
use highlighting or
debugging
Highly extensible,
Can be resource-
supports multiple
Professionals heavy for basic
languages, great
tasks
debugging tools
9
5. Customization Options: Customize the interface and
settings to enhance your coding experience.
10
Basic HTML Tags for Document Structure
Tags Descriptions
11
HTML Basic Structure
HTML Headings
The HTML heading tags are used to create headings for the
content of a webpage. These tags are typically placed inside
the body tag. HTML offers six heading tags, from <h1> to
<h6>, each displaying the heading in a different font size.
Syntax:
<h1></h1>
<h2></h2>
<h3></h3>
<h4></h4>
<h5></h5>
<h6></h6>
Sample Program
<html>
<body>
12
<h1>Heading 1 (h1)</h1>
<h2>Heading 2 (h2)</h2>
<h3>Heading 3 (h3)</h3>
<h4>Heading 4 (h4)</h4>
<h5>Heading 5 (h5)</h5>
<h6>Heading 6 (h6)</h6>
</body>
</html>
<html>
<body>
<p>
HTML stands for HyperText Markup Language.<br>
It is used to design web pages using a markup
language.<br>HTML is a combination of Hypertext
and Markup language.<br>Hypertext defines the
link between web pages.<br>A markup language
is used to define the text document within the
tag which defines the structure of web pages.
</p>
</body>
</html>
13
In this Example:
This HTML code uses a <p> tag to display a paragraph of
text, providing an overview of what HTML is and its
purpose.
The <br> tags are used to insert line breaks, making the
text more readable by separating each sentence onto a
new line within the paragraph.
<html>
<body>
<p>
A Computer Science portal for geeks<br>
A Computer Science portal for geeks<br>
A Computer Science portal for geeks<br>
</p>
<hr>
</body>
</html>
HTML Comments
HTML comments are used to add notes or explanations in the HTML code
that are not displayed by the browser.
14
They are useful for documenting the code, making it easier to understand
and maintain.
To add a comment, use the syntax <!– your comment here –>.
Note: The shortcut for adding the comment through the keyboard is
by typing Ctrl + / in Windows, and Command + / for Mac users.
HTML Attributes
Types of HTML Attributes
HTML attributes can be broadly categorized based on their function
and the type of elements they modify. For example –
15
Global Attributes
These attributes can be used with any HTML element (though their
effects might vary based on the element):
Attribute Description
16
Attribute Description
17