Skip to content

WebDevHubs

  • Home
  • JavaScript
  • Toggle search form

Design a Simple HTML Page | First HTML Project

Posted on March 28, 2025March 28, 2025 By Jyoti No Comments on Design a Simple HTML Page | First HTML Project

HTML is the basic building block of any website. If you want to start your career in web development then it is mandatory to learn HTML for basic understanding. In this article, we will create first HTML project to create a simple HTML page.

A simple HTML page contains some basic HTML elements like <html>, <head>, <body>, … etc. CSS is also required to style the webpage.

Basic Structure of HTML Document

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<!DOCTYPE html>
<html lang="en">
<head>
<title>Basic HTML Page</title>
</head>
<body>
<h1>Heading of Web Page</h1>
<p>Paragraph Content...</p>
</body>
</html>
<!DOCTYPE html> <html lang="en"> <head> <title>Basic HTML Page</title> </head> <body> <h1>Heading of Web Page</h1> <p>Paragraph Content...</p> </body> </html>
<!DOCTYPE html>
<html lang="en">

<head>
    <title>Basic HTML Page</title>
</head>

<body>
    <h1>Heading of Web Page</h1>
    <p>Paragraph Content...</p>
</body>

</html>

The <head> tag contains the meta information and page title. The contents under <body> tag is visible to the browser window.

Design a Simple HTML Page

To design the simple HTML page, we will add some heading, paragraph, and image to the web page.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<h1>Simple HTML Page</h1>
<p>
It is the first project of HTML.
This page contains heading,
paragraph, and image.
</p>
<img src="logo.png" alt="Logo Image">
<h1>Simple HTML Page</h1> <p> It is the first project of HTML. This page contains heading, paragraph, and image. </p> <img src="logo.png" alt="Logo Image">
<h1>Simple HTML Page</h1>
<p>
    It is the first project of HTML.
    This page contains heading,
    paragraph, and image.
</p>

<img src="logo.png" alt="Logo Image">

After adding the HTML code, we need to add some CSS styles to make the webpage better.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
/* Setting the padding and margin of webpage to 0 */
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
/* Setting the font style, background color and text alignment */
body {
font-family: 'Times New Roman', Times, serif;
background-color: aqua;
text-align: center;
}
/* Setting the image size */
img {
width: 300px;
height: 200px;
margin-top: 50px;
}
/* Setting the padding and margin of webpage to 0 */ * { padding: 0; margin: 0; box-sizing: border-box; } /* Setting the font style, background color and text alignment */ body { font-family: 'Times New Roman', Times, serif; background-color: aqua; text-align: center; } /* Setting the image size */ img { width: 300px; height: 200px; margin-top: 50px; }
/* Setting the padding and margin of webpage to 0 */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

/* Setting the font style, background color and text alignment */
body {
    font-family: 'Times New Roman', Times, serif;
    background-color: aqua;
    text-align: center;
}

/* Setting the image size */
img {
    width: 300px;
    height: 200px;
    margin-top: 50px;
}

After combining the HTML, and CSS code, we will get the complete code of simple HTML page.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<!DOCTYPE html>
<html lang="en">
<head>
<title>Design a Simple HTML Page</title>
<style>
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
font-family: 'Times New Roman', Times, serif;
background-color: aqua;
text-align: center;
}
img {
width: 300px;
height: 200px;
margin-top: 50px;
}
</style>
</head>
<body>
<h1>Simple HTML Page</h1>
<p>
It is the first project of HTML.
This page contains heading,
paragraph, and image.
</p>
<img src="logo.png" alt="Logo image">
</body>
</html>
<!DOCTYPE html> <html lang="en"> <head> <title>Design a Simple HTML Page</title> <style> * { padding: 0; margin: 0; box-sizing: border-box; } body { font-family: 'Times New Roman', Times, serif; background-color: aqua; text-align: center; } img { width: 300px; height: 200px; margin-top: 50px; } </style> </head> <body> <h1>Simple HTML Page</h1> <p> It is the first project of HTML. This page contains heading, paragraph, and image. </p> <img src="logo.png" alt="Logo image"> </body> </html>
<!DOCTYPE html>
<html lang="en">

<head>
    <title>Design a Simple HTML Page</title>

    <style>
        * {
            padding: 0;
            margin: 0;
            box-sizing: border-box;
        }
        body {
            font-family: 'Times New Roman', Times, serif;
            background-color: aqua;
            text-align: center;
        }

        img {
            width: 300px;
            height: 200px;
            margin-top: 50px;
        }
    </style>
</head>

<body>
    <h1>Simple HTML Page</h1>
    <p>
        It is the first project of HTML.
        This page contains heading,
        paragraph, and image.
    </p>

    <img src="logo.png" alt="Logo image">
</body>

</html>

Output

Simple HTML Page

You can practice and create a basic HTML page with different HTML elements and CSS styles.

CSS, HTML, Web Technologies, Web Templates Tags:HTML and CSS Projects

Post navigation

Previous Post: Best Way to Initialize an Empty Array in PHP
Next Post: How to Center Text in HTML?

More Related Articles

Remove the First Element of an Array in JavaScript JavaScript
How to Remove Duplicate Values from a JavaScript Array? JavaScript
HTML Ordered Lists HTML
JavaScript Math.sqrt() Method JavaScript
JavaScript Array unshift() Method JavaScript
How to Create Two-Dimensional Array in JavaScript? JavaScript

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Archives

  • May 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024

Categories

  • CSS
  • HTML
  • JavaScript
  • Lodash
  • PHP
  • Python
  • Uncategorized
  • Web Technologies
  • Web Templates

Recent Posts

  • How to Center Text in HTML?
  • Design a Simple HTML Page | First HTML Project
  • Best Way to Initialize an Empty Array in PHP
  • HTML Description Lists
  • HTML Ordered Lists

Recent Comments

No comments to show.

Copyright © 2025 WebDevHubs.

Powered by PressBook Green WordPress theme