Kumail.pk is a Free Platform of

Create Web Page in HTML

Creating a simple web page using HTML is very easy. It requires a text editor, a le with .html extension and a web browser to view that page.

Create Web Page in HTML

Create Web Page in HTML

  • Creating a simple web page using HTML is very easy. It requires a 
  • text editor, a le with .html extension and a web browser to view that page.
  • Step 1: Text Editor
  • Start by simply creating a new blank le in a text editor of your 
  • choice. A simple text editor like notepad can be used to start coding HTML 
  • for a web page.
  • Step 2: Write HTML code in Text Editor
  • Example:
  • Teacher
  • Note Teachers should demonstrate several websites to 
  • familiarize students with different types of websites.
  • 6.2
  • <html>
  •  <head>
  •  <title>My Website</title>
  •  </head>
  •  <body>
  •  Welcome to my first web page.
  •  </body>
  • </html>
  • Ÿ Develop the understanding about HTML
  • Ÿ Apply the various steps involved in creating a web page
  • Ÿ Develop understanding about HTML tags
  • Ÿ Recognize the basic structure of an HTML document
  • SLOs122 123
  • Tag Description
  • <title>
  • It denes the title of a web page. Titles are very 
  • important as they appear on top of the browser 
  • window and displayed on search engine result pages.
  • <footer> It denes the footer for a web page. e.g. “Copyright 
  • 2020. All rights reserved.”
  • Step 3: Save HTML Page
  • Go to File menu and click on Save. Make sure to provide .htm or 
  • .html extension for the le being saved. This will save the document as a 
  • web page instead of a plain text le.
  • Step 4: View HTML Page in Browser
  • Open the saved HTML le in your default web browser. The web 
  • browser will automatically translate HTML codes to correctly display the 
  • web page.
  • 6.2.3 HTML Tags
  • HTML elements are the building blocks of HTML pages. These 
  • elements are dened by placing HTML tags in our document. These tags 
  • are placed inside angular brackets (<>). Some tags also allow further 
  • customization by adding attributes to them. An HTML tag has the 
  • following structure:
  • Simple Tag: <tag-name>content</tag-name>
  • Tag with Attribute: <tag-name attribute-name= “attribute 
  • value”>content</tag-name>
  • The above syntaxes show the structure of opening a tag, dening 
  • attribute values, placing content inside the element represented by that 
  • tag and its closing structure. Most of HTML tags always require a closing 
  • tag while some HTML tags such as <br> are empty tags which means that 
  • they don’t require a closing tag.
  • Create Web Page in HTML
  •  
  • Learn HTML Using Notepad or TextEdit

    Web pages can be created and modified by using professional HTML editors.

    However, for learning HTML we recommend a simple text editor like Notepad (PC) or TextEdit (Mac).

    We believe in that using a simple text editor is a good way to learn HTML.

    Follow the steps below to create your first web page with Notepad or TextEdit.


    Step 1: Open Notepad (PC)

    Windows 8 or later:

    Open the Start Screen (the window symbol at the bottom left on your screen). Type Notepad.

    Windows 7 or earlier:

    Open Start > Programs > Accessories > Notepad


    Step 1: Open TextEdit (Mac)

    Open Finder > Applications > TextEdit

    Also change some preferences to get the application to save files correctly. In Preferences > Format > choose “Plain Text”

    Then under “Open and Save”, check the box that says “Display HTML files as HTML code instead of formatted text”.

    Then open a new document to place the code.


    Step 2: Write Some HTML

    Write or copy the following HTML code into Notepad:

    <!DOCTYPE html>
    <html>
    <body>

    <h1>My First Heading</h1>

    <p>My first paragraph.</p>

    </body>
    </html>

    Notepad



    Create Web Page in HTML 

    Step 3: Save the HTML Page

    Save the file on your computer. Select File > Save as in the Notepad menu.

    Name the file “index.htm” and set the encoding to UTF-8 (which is the preferred encoding for HTML files).

    View in Browser

    Tip: You can use either .htm or .html as file extension. There is no difference, it is up to you.


    Step 4: View the HTML Page in Your Browser

    Open the saved HTML file in your favorite browser (double click on the file, or right-click – and choose “Open with”).

    The result will look much like this:

    View in Browser


    W3Schools Online Editor – “Try it Yourself”

    With our free online editor, you can edit the HTML code and view the result in your browser.

    It is the perfect tool when you want to test code fast. It also has color coding and the ability to save and share code with others:

    Example

    <!DOCTYPE html>
    <html>
    <head>
    <title>Page Title</title>
    </head>
    <body>

    <h1>This is a Heading</h1>
    <p>This is a paragraph.</p>

    </body>
    </html>

    Try it Yourself »

    Click on the “Try it Yourself” button to see how it works

  • Create Web Page in HTML

Apply for Free E-Certification

E-Certification