What's new
NoobsPlanet

Join our community today and enjoy an ad-free experience. Ask questions or learn about anything related to technology!

Simple HTML Page Example for Beginners

Nikesh

Administrator
Staff member
Here’s a basic example of a simple HTML document for beginners learning how web pages are structured.

HTML:
<!DOCTYPE HTML>
<html>
    <head>
        <title>My First HTML Document</title>
    </head>
    <body>
        <p>I successfully created my first document</p>
    </body>
</html>
Screenshot 2025-04-12 at 3.15.36 PM.png


Now let’s go through what each part does:

  • <!DOCTYPE HTML>
    Tells the browser to use HTML5. This should always be the very first line in your HTML file.
  • <html>
    This tag wraps everything on the page. It defines the start and end of your HTML content.
  • <head>
    The head section contains metadata, the page title, links to CSS, and scripts. It does not display anything directly on the page.
  • <title>My First HTML Document</title>
    This sets the name of the tab or window in the browser.
  • <body>
    This is where all visible content goes—text, images, links, etc.
  • <p>I successfully created my first document</p>
    A paragraph element. This will display a block of text on the page.

This is a clean and minimal structure that every HTML file should follow. Once you understand this, you can start building more complex layouts using headings, lists, images, links, and styling with CSS.

If you want an example with those next, just let me know.
 
Top