HTML Basics: Your Gateway to Web Development

John LiterJohn Liter
4 min read

In the digital age, having a basic understanding of HTML (Hypertext Markup Language) is becoming increasingly essential. HTML serves as the backbone of every website on the internet, enabling browsers to interpret and display content. Whether you're interested in building your personal blog, creating a simple webpage, or pursuing a career in web development, learning the basics of HTML is the perfect place to start.


What is HTML?
HTML is a markup language used to structure content on the web. It works in tandem with other technologies such as CSS (Cascading Style Sheets) and JavaScript to create visually appealing and interactive web pages. With HTML, you can define the structure of your webpage, format text, insert images, create lists, and embed multimedia elements like videos and audio.


HTML Document Structure
Every HTML document follows a basic structure, which consists of a few essential components:

<!DOCTYPE html>

This declaration specifies the version of HTML being used. For modern web development, the doctype declaration is typically <!DOCTYPE html>.


<html></html>

The root element of an HTML document. All other elements are nested within this tag.


<head></head>

This section contains meta-information about the document, such as the title that appears in the browser's tab and various other metadata.


<body></body>

The content of your webpage resides within the body element. This is where you define the visible part of your website.


HTML Elements and Tags
HTML is comprised of various elements, each serving a specific purpose and identified by tags. Tags are enclosed within angle brackets < >. An HTML tag usually consists of an opening tag and a closing tag. For example:

<p>This is a paragraph.</p>Here, <p> is the opening tag, and </p> is the closing tag.

The content "This is a paragraph" is enclosed between these tags.


Commonly Used HTML Elements

<h1>, <h2>, <h3>, ... <h6>: Heading tags used to create different levels of headings.
<p>: Paragraph tag for defining paragraphs of text.
<a>: Anchor tag used for creating hyperlinks to other web pages or resources.
<img>: Image tag for displaying images on the webpage.
<ul> and <li>: Unordered list and list item tags used to create bulleted lists.
<ol> and <li>: Ordered list and list item tags used to create numbered lists.

Attributes
HTML elements can also have attributes, which provide additional information about the element. Attributes are added to the opening tag of an element. For example:

<a href="https://www.example.com">Visit Example Website</a>

In this anchor tag, the href attribute specifies the destination URL when the user clicks on the link.


HTML Comments
Comments in HTML are used to add notes or explanations within the code that won't be displayed on the webpage. They are enclosed within <!-- -->. For instance:

<!-- This is a comment. It won't be visible on the webpage. -->

HTML Semantics
HTML5 introduced semantic elements that provide meaning and structure to different parts of a webpage. Some common semantic elements are:

<header>, <nav>, <main>, <article>, <section>, <footer>,

etc. These elements enhance accessibility and search engine optimization while also making your code more organized and readable.


Getting Started with HTML
To begin learning HTML, all you need is a text editor like Notepad (Windows) or TextEdit (macOS). Start by writing simple HTML code, experiment with different elements and tags, and see how they appear in a web browser. Online tutorials and interactive websites can also provide hands-on practice and guidance.

HTML is the foundation of web development, and understanding its basics is crucial for anyone venturing into the world of creating web content. Once you grasp the fundamentals of HTML, you can explore more advanced concepts like CSS and JavaScript to build stunning and interactive websites. So, dive in, experiment, and let your creativity flow as you embark on your journey to become a proficient web developer!

Here are a few of my favorite sites and applications to learn HTML:

W3 Schools

freeCodeCamp

Geeks for geeks

solo learn

I hope you found this helpful and potentially learned something new.

<Happy Coding!>

0
Subscribe to my newsletter

Read articles from John Liter directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

John Liter
John Liter

I am Retired Army Staff Sergeant. I am pursuing a bachelor's degree for Web Development. My Goal in life is to teach what I learn to everyone that wants to learn.