Pages

Wednesday, June 10, 2026

Frist HTML Class✔

                                                                         HTML


Creating your first HTML page is the foundation of web development. All it takes is saving a simple text document with an .html extension containing basic tags like <html>, <head>, and <body>. It tells the web browser how to structure and display your content. 

*Setting Up Your Environment
*To get started, you only need two basic tools that are already on your computer:
  • Web Browser: Google Chrome, Safari, or Microsoft Edge.
  • Text Editor: Notepad (Windows) or TextEdit (Mac). For a better experience, download Visual Studio Code. [1]
Your First HTML Document
Type or paste the following code into your text editor:
html
<!DOCTYPE html>
<html>
  <head>
    <title>My First Webpage</title>
  </head>
  <body>
    <h1>Welcome to my first webpage!</h1>
    <p>This is my first paragraph written in HTML.</p>
  </body>
</html>
Use code with caution.
Understanding the Code
  • <!DOCTYPE html>: Tells the browser this is an HTML5 document.
  • <html> and </html>: The root element that wraps all the code on the page.
  • <head> and </head>: Contains background information (metadata) like the page title.
  • <body> and </body>: Holds all the visible content—like text, images, and links.
  • <h1>: Defines a main heading.
  • <p>: Defines a paragraph. 
How to View Your Page
  1. In your text editor, click File > Save As.
  2. Name your file index.html and set the format to All Files (not Text Document).
  3. Find the saved file and double-click it. It will automatically open in your web browse.

No comments:

Post a Comment

Frist HTML Class✔

                                                                          HTML *  Creating your first HTML page is the foundation of web de...