HTML Tutorial - Learn HTML For Free
HTML Tutorial - Learn HTML For Free
HTML Tutorial - Learn HTML For Free
HTML is a standard markup language, which stands for Hyper Text Markup Language. It is widely used
language to create webpages. HTML invented by Tim Berners-Lee in late 1991, but it's first version
"HTML 1.0" was released in 1993, and "HTML 2.0" was the first standard HTML specification, which was
published in 1995.
This HTML tutorial covers everything from basic HTML fundamental concepts and tags to advanced
techniques, such as forms, modal boxes, multimedia, and HTML5. This tutorial is designed to help both
beginners and experienced designers become experts in building dynamic and responsive websites.
What is HTML?
HTML (HyperText Markup Language) is a standard markup language to design the structure of a
webpage. HTML is the combination of HyperText and Markup Language. HyperText defines the internal
links between webpages, and Markup language defines the layout and presentation of text and media.
Open Compiler
<!DOCTYPE html>
<html>
<head>
<title>Page title</title>
</head>
<body>
<h1>Webpage's Heading</h1>
<p>Content (Your first paragraph).</p>
</body>
</html>
Explore our latest online courses and learn new skills at your own pace. Enroll and become a certified
expert to boost your career.
1. <!DOCTYPE html>
This element defines the document type as HTML. This element must be written before writing any
HTML document.
2. <html>...</html>
The <html> tag is the parent tag for all HTML elements. Everything related to create an HTML document
must be written inside the <html> tag. CSS, JavaScript, and jQuery must also be written inside this tag.
3. <head>...</head>
The <head> tag is a container tag for all those elements that are not directly displayed on the webpage
but required for the page functionalities. It contains meta tags (which are used for SEO purposes), title
tag, script tags, etc.
4. <title>...</title>
The <title> tag is used to define the title of the webpage that you can see in the browser's tab,
bookmarks list, and search engine results. This tag is also very important for SEO purposes to help
search engine to understand the content of the webpage.
5. <body>...<body>
The <body> tag is the container tag for all those elements, which represents the main content of a
webpage that displays on the browser.
6. <h1>...</h1>
The <h1> tag is one of the heading tags. It is the most important heading tag, which defines the main
title or headline of the webpage. Any text written inside <h1> and </h1> is a top-level heading of the
content.
7. <p>...</p>
The <p> tag defines a paragraph, anything written inside <p> and </p> displays as a paragraph on the
webpage. Use multiple <p> tags to display text in different paragraphs.
Open Compiler
<!DOCTYPE html>
<html>
<head>
<title>Hello World Example by TutorialsPoint</title>
</head>
<body>
<h1>Hello, World!</h1>
</body>
</html>
</pre>
The above example will display "Hello, World!" on the browser inside top-level heading (h1).
Comments in HTML
Just like other programming languages, you can keep any text as a comment inside an HTML
document. To create a comment in HTML, use <!-- and -->.
Any text written inside <!-- and --> considers as comment and it does not display on the website.
Example
Below is the example of HTML comment −
Open Compiler
<!DOCTYPE html>
<html>
<head>
<title>Online HTML Editor</title>
</head>
<body>
<h1>Online HTML Editor</h1>
<p>Hello World</p>
</body>
</html>
And, finally, open the file in the browser by typing the file name with a complete path, or just open it by
right-clicking and opening with a browser.
HTML is a MUST for students and working professionals to become great software engineers,
especially when they are working in the web development domain.
Create a web site − You can create a website or customize an existing web template if you know
HTML well.
Become a web designer − If you want to start a career as a professional web designer, HTML and
CSS designing is a must-have skill.
Understand web − If you want to optimize your website, to boost its speed and performance, it is
good to know HTML to yield the best results.
Learn other languages − Once you understand the basics of HTML, then other related
technologies like JavaScript, PHP, or Angular are easier to understand.
Applications of HTML
As mentioned before, HTML is one of the most widely used languages on the web. Here are some of the
applications of HTML −
Website development − HTML is used to create webpages (websites) that are rendered over the
web. Almost every page of the web has html tags in it to render its details in the browser.
Internet Navigation − HTML provides tags that are used to navigate from one page to another and
is heavily used in internet navigation.
Responsive UI − HTML pages now-a-days work well on all platforms, mobile, tabs, desktops, or
laptops owing to responsive design strategy.
Offline support − HTML pages, once loaded, can be made available offline on the machine
without any need of internet.
Game development − HTML5 has native support for rich experiences and is now useful in the
gaming development arena as well.
Mobile application development − HTML with CSS3 and JavaScript can be used for developing
cross-platform mobile applications.
Multimedia and video streaming − HTML5 offers support for multimedia elements like video and
audio, which enables seamless media playback directly in web browsers.
Experience with any text editor like Notepad, Notepad++, or Edit Plus etc.
Careers in HTML
HTML is the basics for web development. Good knowledge of HTML helps you to build your career in
the following fields −
Front-end developer
Web designer
Full stack developer
Email developer
Web design reviewer
HTML Articles
Explore our 2000+ HTML articles to find the solutions to your web design and development related
problems. Visit: HTML Articles
The HTML tags help search engines understand the content of the web page.
The HTML forms enable user interactions and include call-to-action buttons, text fields,
checkboxes, and many more.
Using HTML, we can embed various types of media like images, audio, video, etc., into a web
page.
It is also used in the creation of hyperlinks that can point to other web pages, different sections of
the same page, or other resources on the web.
Open a text editor (like Notepad, Sublime Text, Atom, etc.) on your system.
Write your HTML code.
In the dialogue box, choose the location where you want to save the file.
Type a name for your file, followed by the .html extension so that the browser interprets it as an
HTML file. For example, index.html.
Click "Save".
Simplicity − HTML is easy to learn and use. It has a clear and straightforward syntax which
makes it simpler for beginners also.
Flexibility − HTML allows developers to create a wide variety of web documents, from simple
static web pages to complex web applications.
Platform Independent − HTML is a standard that is supported by all modern web browsers. This
means that an HTML document can be displayed in any web browser on any operating system.
Linking − One of the key features of HTML is the ability to create links to other web pages.
Embedding Media − It also allows embedding various types of media like images, audio, video,
etc., into a web page.
Interactivity − HTML provides elements to create interactive forms that allow users to input data.
This is crucial for tasks like user registration, submitting search queries, and more.
Semantics − HTML5 introduced semantic elements that convey the meaning of the content to the
browser and developer. Examples include <header>, <footer>, <article>, and <section>.
Integration − HTML works well with other languages that are commonly used in web
development, such as CSS (Cascading Style Sheets) and JavaScript. CSS is used for styling and
layout of web pages while JavaScript is used for interactivity.
localStorage − This object stores data with no expiration date. The data will not be erased when
the browser is closed and will be available in the next session.
sessionStorage − This object stores data for one session. The data is lost when the browser tab
is closed.
DOCTYPE Declaration − An HTML document starts with a <!DOCTYPE html> declaration followed
by a <html> tag.
Headings − HTML provides six levels of headings from <h1> to <h6>, with <h1> being the highest
(or most important) level and <h6> the lowest.
Paragraphs − The <p> tag defines a paragraph.
Links − The <a> tag defines a hyperlink, which is used to link from one page to another.
Divisions & Sections − The <div> tag is a container unit that encapsulates other page elements
and divides the HTML document into sections. HTML5 introduced semantic elements like
<section>, <article>, <header>, <footer>, <nav>, etc., which serve a similar purpose but provide
additional semantic information.
Media Elements − HTML5 introduced media elements like <video> and <audio> which can be
used to embed video and audio files in an HTML document.