Programming

Programming intro
Java

Markup

First webpage guide
HTML
XHTML

Style & Layout

CSS

Browser scripting

Javascript
VBScript
AJAX

Server scripting

PHP
ASP

Making money online

Make money online

Your first XHTML document

This tutorial focuses on creating your first XHTML document in:

Windows

  1. Open notepad by going to Start -> Programs -> Accessories -> Notepad OR go to Start -> Run - Type notepad and press Enter.
  2. Type in the following code:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 
    1.0 Transitional//EN" "http://www.w3.org/TR/
    xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <title>My first page</title>
    </head>
    <body>
    <h1>My first XHTML page!</h1>
    </body>
    </html>
    
  3. Save the file as first firstdoc.html

    NOTE: Make sure that you give the file a .html extension and that you save it as type 'All Files', otherwise you will get plain text.

  4. Open your web browser.

  5. Type into the web browsers location bar the absolute location of the directory where you saved your file along with the file name. For example, if you saved the file in C:\windows, type C:\windows\firstdoc.html into the web browsers location bar.

  6. You should now see an XHTML document in your web browser which looks like this:

    Document result

Linux

  1. Open nano and type in the following code:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 
    1.0 Transitional//EN" "http://www.w3.org/TR/
    xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
    <title>My first page</title>
    </head>
    <body>
    <h1>My first XHTML page!</h1>
    </body>
    </html>
    
  2. Save the file as first firstdoc.html

  3. Type into the web browsers location bar the absolute location of the directory where you saved your file along with the file name. For example, if you saved the file in /home/user1/desktop, type /home/user1/desktop/firstdoc.html into the web browsers location bar.

  4. You should now see an XHTML document in your web browser which says "My first XHTML page!"


Screenshot for Linux coming soon..

Mac

Coming soon..

Step-by-step tutorials
Programming intro
HTML
XHTML
CSS
Javascript
Java

Practice

Online code editor
Practical examples
Practical exercises

Reference

Terms glossary
Reference material

Rate this site

Rate this site
Visitor comments