HTML 2
HTML 2
An Introduction to HTML
HTML stands for HyperText Markup Language. It is used to structure the content on the web by using
various elements (commonly known as tags). These HTML elements define the different sections of a
web page, such as headings, paragraphs, links to other webpages, listings, images, tables, etc. These
elements tell the browser about the content and formatting to display.
HyperText refers to the way in which Web pages (HTML documents) are linked together. Thus,
the link available on a webpage is called "HyperText".
Markup Language, which means you use HTML to simply "mark up" a text document with tags
that tell a Web browser how to structure it to display.
<tag_name>content</tag_name>
Here,
"It is top-level heading" is the content, which is placed inside the start and end tags.
Explore our latest online courses and learn new skills at your own pace. Enroll and become a certified
expert to boost your career.
HTML Page Structure
HTML page structure (or, HTML basic structure) consists of the essential elements that are required to
create an HTML document that can be displayed on the browser.
HTML page structure contains <!DOCTYPE html>, <html>, <head>, <title>, <body>, and other tags that
will be shown on the homepage.
Where,
<html> − It is a root element for an HTML document. All elements are placed inside this element.
<head> − The head tag may contain scripts and styles that are useful page functionalities. Meta
tags are also placed inside this tag.
<title> − It defines the webpage's title.
<body> − It defines the body of the webpage, all elements that are used to display content on the
browser placed inside the body tag.
<h1> and <p> − The h1 tag defines page heading, and p tag defines paragraph.
<h1> to <h6> − These are heading tags and used to write headings for the webpage. Where, <h1>
is the top-level heading and <h6> is the bottom-level (lowest) heading.
<a> − The <a> tag stands for "anchor", and it is used to place a link in the webpage.
<pre> − The <pre> tag is used to preserve formatting.
You can find more tags here. Visit: HTML Tag References.
Open Compiler
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>HTML First Example</title>
</head>
<body>
<h1>Welcome to HTML</h1>
<p>HTML is the hyper text markup language.</p>
<h2>About HTML</h2>
<p>HTML is not programming language it is the markup language. The HTML
<h3>Our Web Tutorials</h3>
<p>Ordered list</p>
<Ol>
<li> Milk </li>
<li> Sugar </li>
<li> Powder </li>
</Ol>
<p>Unordered list</p>
<Ul>
<li> Milk </li>
<li> Sugar </li>
<li> Powder </li>
</Ul>
</body>
</html>
About HTML
HTML is not programming language it is the markup language. The HTML
includes various tags like head , body ,html, paragraph,list tag etc .
Ordered list
1. Milk
2. Sugar
3. Powder
Unordered list
Milk
Sugar
Powder
<!DOCTYPE html>
There are many other declaration types that can be used in HTML documents, depending on what
version of HTML is being used. We will see more details on this while discussing the <!DOCTYPE...> tag
along with other HTML tags.
The following image shows the evolution of HTML over the period of years −
HTML elements are the basic building blocks that are made with the help of tags and content. An HTML
element is created with a start tag, a content, and an end tag.
And, HTML attributes provide additional information about HTML elements; in order to define or change
their behavior. Attributes are used with an opening tag.
Importance of HTML
HTML is the fundamental building blocks of the World Wide Web. Any page that you visit on the web
contains HTML tags. HTML is important for the various reasons −
With the help of CSS and JavaScript, HTML helps to create beautiful and interactive websites.
HTML helps in search engine optimization by optimizing the tags based on the targeted
keywords.
HTML helps to navigate (or browse) different pages and websites from anywhere on the internet.
HTML supports user input and forms; you can easily get information from anywhere in the world
(you may need background database support for it).
HTML follows an open standard by W3C. Thus, HTML supports all browsers on any type of
device. You do not need to change the HTML for the different browsers or devices.
To learn HTML, you will need to study various tags and understand how they behave, while formatting a
textual document. Learning HTML is simple, as users have to learn the usage of different tags in order
to format the text or images to make a beautiful webpage.