HTML Beginners Guide

HTML Beginners Guide

Learn the fundamentals of HTML to start building your own websites.

Get Started

Understanding HTML Basics

By Ryan Kopf, University of Iowa Computer Science
Last Updated May 20, 2024

HTML (HyperText Markup Language) is the backbone of the web. It creates the structure of websites, allowing you to define elements like headings, paragraphs, links, images, and more. This guide introduces you to HTML basics, helping you start crafting your own websites.

What is HTML?

HTML consists of elements that enclose content to make it appear or behave in a certain way. Enclosing tags can create hyperlinks, italicize words, and adjust font size, among other things.

Basic Structure of an HTML Document

Every HTML document starts with a declaration defining the HTML version. The document includes a <head> section for meta information and links to scripts and stylesheets, and a <body> section for visible content.

Creating Your First HTML Page

To start, use a text editor to create a new file, save it with a .html extension, and begin writing HTML. Start with a basic template that includes the doctype, and add elements like <h1> for headings, <p> for paragraphs, and <a> for links.

Essential HTML Tags

  • <h1>-<h6>: Heading tags, with <h1> being the most important and <h6> the least.
  • <p>: Represents a paragraph.
  • <a>: Anchor tag used to create links, essential for navigating between web pages.
  • <img>: Embeds images in your webpage.

Understanding these tags allows you to create a basic webpage. For detailed examples and advanced features, visit our complete guide on using Raven's templating features.

Where to Publish Your HTML Files

After creating your HTML files, you'll need a place to publish them. For insights on where to publish, check out our article on where to publish personal HTML files.

So You've Published Your Files, Now What?

Congratulations on publishing your HTML files! While it's great to see your work online, your pages might look plain. This is where CSS (Cascading Style Sheets) comes into play. CSS is a stylesheet language that describes the presentation of a document written in HTML, allowing you to control the layout, colors, fonts, and overall visual appearance of your website.

To get started with CSS, link a stylesheet to your HTML using the <link> element in the head section of your document. Here's a basic example:

<link rel="stylesheet" href="styles.css">

Inside the "styles.css" file, define some basic styles, such as setting the background color of your page, changing font types, or aligning text:

body {
    background-color: #f4f4f4;
    font-family: Arial, sans-serif;
    color: #333;
}

h1 {
    color: #026466;
    text-align: center;
}

Adding CSS to your web pages enhances user experience, improves usability, and makes your site visually appealing. If you're new to CSS, plenty of resources and tutorials are available online to help you start styling your pages. You can find some great CSS courses on YouTube to start with.

Finding Affordable Hosting

Hosting your website doesn't have to be expensive. For recommendations on affordable hosting solutions, see our article on the cheapest places for website hosting.

Begin Your Web Development Journey

Start learning HTML today and build the foundation of your web development skills.

Get Started