ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel
  • »
  • Technology»
  • Internet & the Web

Creating your Sample HTML Program

Updated on March 29, 2011
Eve Corner, Sample HTML web page
Eve Corner, Sample HTML web page

Every HTML document begins with a DOCTYPE declaration. It specifies which HTML version or document type you used to create the document. The most inclusive version of HTML 4.0 is HTML 4.0 Transitional. It incorporates all HTML structural and presentation elements.

The HTML is a collection of markup elements and attributes that describe the web page content:

Here's a sample HTML program:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">

<title>Web resources about jobs, sports, entertainment, food, beauty, & more -</title>
<meta name="Description" content="Articles and daily resources about jobs, sports, entertainment, food, beauty, and more" />
<meta name="Keywords" content="sports,entertainment,food,beauty,telecommuting,summer jobs for teens,parttime,food recipes,entertainment gossip,work at home,work from home,asian beauties,brazilian beauties,stimulus jobs"/>

<body bgcolor="orange" text="black">

<img src="header.jpg" height="150" width="760" alt="Web resources about jobs, sports, entertainment, food, beauty, and more">

<h1>Welcome to</h1>

<p>Whether you are looking for telecommuting jobs and data entry, or just data entry jobs, there are some things that you will need to know. Come on in and let us inform you about data entry.
<a href="">More>></a>


The <html> element defines the document as an HTML document.

The <head> element creates a header section for the document.

The <title> element inside the <head> element defines a document title that will be displayed in the internet browser’s title bar on top.

The <meta> element is the metadata which means data that describes the data on your web page. It may include keywords, page description, author, or the software application you used to create the page.

The <body> element contains the actual text that will be displayed in the browser window. The bgcolor and text attributes set the background color of the page and the color of the text.

The <img> element uses a single tag (called empty element) to display an image or picture.

The <src> attribute provides the specifics on the image you want to display.

Other attributes such as height, width, align, and hspace tells how to display the image.

The alt attribute is the text alternative in case the browser doesn’t display the image.

The <h1> element marks the text as a first-level heading that’s why it’s bigger and bold.

The <p> element identifies that paragraph in the document.

The anchor element is used to create links.

The link element or hyperlink gives users the capability to jump to another page. It is the web address (called a Uniform Resource Locator, or URL) of the page you want to link to.

The <br> element adds a manual line break.


    0 of 8192 characters used
    Post Comment

    • profile image

      kamal 5 years ago


    • profile image

      jerald 5 years ago

      i need some codes on how to create simple web page

    • profile image

      Amarnath 5 years ago

      kindly attach more sample programs

    • GmaGoldie profile image

      Kelly Kline Burnett 7 years ago from Madison, Wisconsin

      I just ordered some books on HTML - plan on reading like crazy - hard subject for me. Thank you for the Hub!