Start learning HTML

Published: (April 8, 2026 at 07:33 AM EDT)
2 min read
Source: Dev.to

Source: Dev.to

Introduction

This is my first DevPost entry. I’m learning HTML, the markup language used to communicate the structure of a web page to browsers. Unlike programming languages, markup languages define how content such as text, images, videos, and links are organized and displayed.

HTML Basics

HTML uses tags to structure a page. Common tags include:

  • “ – the root element
  • “ – contains meta‑information, title, and links to stylesheets
  • “ – holds the visible content
  • “ – creates form fields
  • “ – creates clickable buttons

Creating a Simple Login Page

Below is a basic example of a login page built with HTML. It includes fields for a username and password and a submit button.

<!DOCTYPE html>
<html>
<head>
    <title>Login Page</title>
    <style>
        /* Simple CSS to style the form */
        body {
            font-family: Arial, sans-serif;
            margin: 2rem;
        }
        .login-form {
            max-width: 300px;
            margin: auto;
        }
        .login-form input,
        .login-form button {
            width: 100%;
            padding: 0.5rem;
            margin-top: 0.5rem;
        }
    </style>
</head>
<body>
    <div class="login-form">
        <h2>Login</h2>
        <input type="text" placeholder="Username" />
        <input type="password" placeholder="Password" />
        <button type="submit">Submit</button>
    </div>
</body>
</html>

The page uses basic HTML tags to define the structure and a small CSS block to style the form. This demonstrates how HTML and CSS work together to create a functional and presentable login interface.

0 views
Back to Blog

Related posts

Read more »