<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>My First Web Page</title>
    <style>
        html {
            font-size: 20px;
        }

        body {
            background-color: #333;
            color: white;
        }
    </style>
</head>

<body>
    <h1>Hello World!</h1>
    <p>This is my first web page.</p>
</body>

</html>
  1. <!DOCTYPE html>: This is a document type declaration and informs the browser that the document is written in HTML5.
  2. <html lang="en">: The <html> tag defines the root element of an HTML document. The lang attribute specifies the language of the document, which in this case is set to English.
  3. <head>: The <head> section contains meta-information about the HTML document, such as character encoding, title, and CSS stylesheets.
  4. <meta charset="UTF-8">: This meta tag sets the character encoding to UTF-8, which is the standard for handling international characters and symbols.
  5. <title>My First Web Page</title>: The <title> tag sets the title of the web page that will be displayed in the browser’s title bar or tab.
  6. <style>: The <style> tag is used to define inline CSS styles for the HTML document.
  7. html {}: This is a CSS selector that targets the html element. In this case, it sets the font size to 22 pixels.
  8. body {}: This CSS selector targets the body element and sets the background color to #333 (a dark gray) and the text color to white.
  9. <body>: The <body> tag encloses the content of the web page that will be displayed in the browser.
  10. <h1>Hello World!</h1>: This is a level 1 heading element (<h1>) that displays the text “Hello World!” as a heading on the web page.
  11. <p>This is my first web page.</p>: This is a paragraph element (<p>) that displays the text “This is my first web page.” as a paragraph on the web page.
The code provided creates a simple web page with a dark gray background, white text color, and a heading that says “Hello World!” followed by a paragraph of text.

If you seek high quality web design, web application or ecommerce development.

Connect With Us

Work Shots...

Back Home