HTML Introduction
HTML (Hyper Text Markup Language) is the foundation of every web page. By learning HTML, you can create and design web pages, format text, add images and videos, and create hyperlinks. In this introduction, we'll cover the basics of HTML structure, elements, and attributes.
Basic HTML Structure
Try yourself
<!DOCTYPE html>
<html lang="en">
<head>
<title>My First Web Page</title>
</head>
<body>
<h1>Heading1</h1>
<p>Paragraph.</p>
</body>
</html>
Explanation
- The <!DOCTYPE> declaration is used to specify the version of HTML being used.
- The <!DOCTYPE html> declaration specifies that the document is an HTML5 document.
- The <html> element (tag) serves as the root element of the HTML page.
- The <head> element (tag) contains meta information, such as the document's character encoding and the page title.
- The <title> element (tag) specifies the title displayed in the browser's title bar or tab.
- The <body> element (tag) holds the visible content of the webpage, including headings, paragraphs, images, and more.
- The <h1> element (tag) in HTML is used to define a large heading on a webpage.
- The <p> element (tag) in HTML is used to define a paragraph of text on a webpage.
Web browser
A web browser is software that displays web pages from the internet. It retrieves content from web servers and interprets web technologies like HTML, CSS, and JavaScript.
Popular browsers include Google Chrome, Mozilla Firefox, Microsoft Edge, Apple Safari, and Opera.
HTML Elements: Tags, Content, and Examples
HTML elements are defined by a start tag, some content, and an optional end tag.
Example
- The <h1> tag is the start tag
- The Heading 1 text is the content
- The </h1> tag is the end tag.
Start tag |
Element content |
End tag |
<h1> |
Heading 1 |
</h1> |
<p> |
Paragraph |
</p> |
<br> |
none |
none |
Important Information
- HTML is a markup language, not a programming language.
- HTML elements are defined by start tags, content, and end tags.
- HTML elements can be nested.
- HTML elements can have attributes.
- HTML is a powerful language that can be used to create a wide variety of web pages.
Benefits of Learning HTML
- Learning HTML is an essential skill for anyone interested in web development, web design, or digital content creation.
- HTML is the foundation of every website, so knowing how to code in HTML will enable you to create and customize web pages to your liking.
- HTML is a versatile and flexible language, so you can use it to create websites, web applications, email newsletters, and other digital content.
- Knowing HTML can also make it easier to learn other web development languages and technologies, such as CSS and JavaScript.
HTML Versions
The HyperText Markup Language (HTML) has been evolving since its inception in the early 1990s. There have been many different
versions of HTML released over the years, each with its own set of features and improvements.
Here is a list of the major versions of HTML:
-
HTML 1.0:
This was the first version of HTML, released in 1991. It was a very basic language that only supported a few elements, such as headings, paragraphs, and lists.
-
HTML 2.0:
This was released in 1995 and added support for a number of new elements, such as tables, images, and forms.
-
HTML 3.2:
This was released in 1997 and added support for a number of new features, such as frames, scripting, and style sheets.
-
HTML 4.01:
This was released in 1999 and was the last major version of HTML to be released by the World Wide Web Consortium (W3C).
It added support for a number of new features, such as internationalization and accessibility.
-
XHTML:
This is a reformulation of HTML 4.01 that uses XML syntax. It was released in 2000 and was intended
to be a more future-proof version of HTML.
-
HTML5:
This is the latest version of HTML and is still under development. It adds support for a number of new features,
such as video, audio, and geolocation.
Important
HTML5 is the most recent version of HTML and is the most widely used version of HTML.
It is supported by all major web browsers and is the recommended version of HTML for creating new web pages.
If you are new to HTML, I recommend starting with HTML5. There are many resources available to help you learn HTML5,
including tutorials, articles, and videos.