Tuesday, January 19, 2010

Sample Web Page

In this tutorial, I will show you how to create a simple web page.

4 Steps to Create a Simple Web Page

  1. Open a Notepad learn html online
  2. Write the text below on your notepad.

    Hello World
  3. Save file as Helloworld.html
    Note: When saving *.html in notepad make sure you'll include double qoutes(") around the filename, like for example -> "helloworld.html" - this will save the file as *.html and and not *.txt
    learn html online
  4. learn html online Open the helloworld.html file. Just simply double-click the file it will automatically open a web browser.
Congratulations! You have successfully created your first web page. On your browser screen, you'll see a "Hello World" text display on the screen. :)

It is advisable to follow the markup tags format below everytime you create a webpage. For now, I will not discuss the details of the tags.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title>Web Page Title</title>
  </head>

  <body>
      Hello World
  </body>
</html>

Copy the code above and overwrite helloworld.html file or save the changes. Then refresh the browser. You'll notice the output is the same as before but notice on the header bar you'll see the text "Web Page Title". That is the string inside the <title>Web Page Title</title> pair of tags.

From now on, we will follow this main html tag structure.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title>...</title>
  </head>

  <body>
      ...
  </body>
</html>

Related Posts




No comments:

Post a Comment