What is HTML? HTML stands for HyperText Markup Language. It's the standard markup language used to create web pages. HTML provides the structure and content of websites.
The Purpose of HTML
HTML serves to:
Define the structure of web content
Create semantic meaning for text and media
Provide the foundation for styling with CSS
Enable functionality with JavaScript
Make content accessible to all users
A Brief History
HTML was created in 1989 by Tim Berners-Lee at CERN. The first version (HTML 1.0) was very simple, with just 20 tags. Today, HTML5 is the current standard with many more features and improved capabilities for modern web applications.
HTML Elements
HTML uses tags to mark up content. Tags tell the browser how to display information. Most tags come in pairs: an opening tag and a closing tag.
<p>This is a paragraph.</p>
<h1>This is a heading.</h1>
<a href="https://example.com">This is a link</a>
Tag Anatomy
Opening tag: <tagname>
Content: The text or media inside the tags
Closing tag: </tagname>
Element: Opening tag + content + closing tag
Self-Closing Tags
Some tags don't need a closing tag because they don't contain content. These are called void elements or self-closing tags: