XHTML & CSS Tutorial - Your first webpage
This is the time you've been waiting for, making your first webpage! Before you can actually make your webpage your need something to type the XHTML and CSS into, I recommened Notepad but you can use software like Dreamweaver or Frontpage if you wish. For all these lessons I'll be assuming your using Notepad as that's all I use.
Ok so open Notepad and type in the webpage shell shown in the previous lesson, this as you should know will be used in almost all your webpages. Chose a title for your webpage and type it in the title tags. Now we want to output something for people to see, and if you've read the lesson before this one your know that it has to be between <body> and </body>.
We're going to display some text so to do this you will need to use the paragraph tags which are <p> and </p>. Inside the paragraph tags you can write whatever you want but to show you I'll put "Hello World!". Thats all you need for you need to make a simple webpage, check that your XHTML looks something like whats below.
<html xmlns="http://www.w3.org/1999/XHTML" xml:lang="en" lang="en">
<head>
<link href="style.css" rel="stylesheet" type="text/css">
<title>My first webpage!</title>
</head>
<body>
<p>Hello World!</p>
</body>
</html>
Ok so your XHTML looks something like that? Good. Your now need to save the document as a html file. To do this go to file > save as, name it something like index.html and click on the drop down box on "save as type" and select "All files". Click here to see a picture of what I mean. Now open the folder you saved the html file to and double click the file. As you can see it will show whatever you put in the <p> </p> tags! It may not look good yet but add some css and excusive content and your have a great site.