Results 1 to 1 of 1

Thread: How to write a web page in HTML (HyperText Mark-up Language)

  1. #1
    Join Date
    Nov 2009
    Posts
    76,596

    Default How to write a web page in HTML (HyperText Mark-up Language)

    Web pages are text files, written with a text editor such as SimpleText (Mac), Notepad (Windows) or vi (Unix). The formatting of the page is described with HTML (HyperText Mark-up Language) tags. A web browser (Chrome, Firefox or IE) uses the tags to format the text on the page for display.

    All web pages have at least these two pairs of tags:

    Code:
    <html>
    <body>
    
    </body>
    </html>

    The name of the tag (HTML, for example) is enclosed by a less-than symbol (<) and a greater-than symbol (>). Most tags are used in pairs and the closing tag contains a slash (/) before the name.

    Create a folder on your computer for your web pages. Call it something like "web_site". Open your text editor (Notepad, for example) and copy the following text into a new document:

    Code:
    <html>
    <body>
    My Web Page
    This is the text of my web page.
    Please look at my second web page.
    This page was written by Your Name, [email protected]
    March 18, 2014
    </body>
    </html>

    Save the document in your web_site folder as "index.html".

    The file names of web pages must not have spaces and should end with the extension ".html"

    about us is not a valid file name
    about_us.html is a valid file name

    Use your web browser (Chrome, Firefox or IE) to open the file you just saved.

    When viewed in the web browser, the text runs together, like this:

    My Web Page This is the text of my web page. Please look at my second web page. This page was written by Your Name, [email protected] March 18, 2014

    Go back to the text editor and add the tags to format the text when it is displayed by a web browser:

    Code:
    <html>
    <body>
    <h1>My Web Page</h1>
    <p>This is the text of my web page<p/>
    <p>Please look at my second web page</p <hr>This page was written by Your Name, [email protected] <br > March 18, 2014 <hr />
    </body>
    </html>
    Save the text editor document and go back to the web browser. Click Reload or Refresh. The tags you just added will produce this in your web browser.



    Example Page

    http://learnhtml.bizhat.com/example_001.html

    Source Code

    http://learnhtml.bizhat.com/example_001.html.txt
    Last edited by sherlyk; 03-19-2014 at 11:39 AM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •