Your First HTML File

Together we will discover the various HTML Editors, analyze the structure of an HTML file, and master the intricate art form of saving your file and witnessing your creation unfold in a web browser.

HTML Editors

To begin this quest, we must first equip ourselves with a reliable HTML editor, a tool that will serve as your faithful quill and ink, allowing you to inscribe your creativity on the web.

You can grab any old text editor you fancy—even Notepad or TextEdit would do the trick! But, just a little nudge, life gets a whole lot easier if you pick an editor designed to write HTML.

Below are links to some of the most popular code editors:

Choose the editor that resonates most with yourself, for it shall be your companion as you traverse the vast landscapes of HTML.

HTML Basic Structure

Open your editor and create a new file and paste in the following:

<!DOCTYPE html>
<html>
<head>
    <title>My First HTML File</title>
</head>
<body>
    <h1>Welcome to the Enchanting World of HTML!</h1>
    <p>Here, dreams come to life, and ideas take flight.</p>
</body>
</html>

If your editor asks you to open a folder. This can be any folder on your computer. Just remember where it's being saved.

The code snippet above is the basic structure of every webpage. Let's do a quick breakdown of this code:

HTML Tag Description
<!DOCTYPE html> This declaration informs the browser that we are crafting an HTML document.
<html> This is the opening tag for our HTML document, everything inside this tag will be our HTML.
<head> This is the head tag for our document. A container for metadata about our web page such as the title and more.
<title> Within this tag we specify the title of our document. This will appear in the browser tab.
<body> Anything we want to be diplayed on our page will live inside the body tag, such as text, images, and many other wondrous elements.

No need to memorize all of this at once. If you find yourself needing to recall the basic structure, you can always come back to this page for reference. Understanding and remembering this structure will come naturally with time.

Saving and Viewing Your HTML File

Now, save your file with an extension of .html. You can name the file anything you want, and then locate that file inside of Finder or File Explorer. You'll be able to double-click this file and it will open up in your browser showcasing the masterpiece of your first HTML page.


Next, you will unleash your creativity by discovering the incredible power of tags! Let's dive in and learn how to make your webpages come alive with amazing elements and fantastic features!

Previous Next

Written © 2024 Written Developer Tutorials and Posts.

𝕏