This won't be a HTML reference guide, because there are plenty of those already. More importantly, it will discuss how to do this programming using linux, and Mandriva in particular. Let's start first of all with a basic HTML page.
<html> <head> <title>Simple html</title> </head> <body> <h1>Simple html page</h1> <p>This is just a verrrry simple html page.</p> <body> </html>
and let's save this file in our home directory as testpage.html.
The simplest way to view it is to fire up your browser (Konqueror, Mozilla, Firefox, Opera, whatever you like. Even Lynx if you want!) and open the file that you've just saved. Congratulations, you may begin coding :)
The above of course should work with any system, because it's just using the file system rather than a web server. So let's get a web server running and deliver the same file via http.
The first thing to do is check that the web server is running - this will depend on which packages you chose to install and which services
to activate. Try it by pointing your browser to
http://localhost/. You should get an Apache information page if the web
server is running. If not, make sure you have the apache packages installed and check that the
httpd service is running
(use "Configure Your Computer" under "System" and "System Services").
On Mandriva, the default root directory for the Apache web server is
/var/www/html, so you can copy your testpage.html file
over to the
/var/www/html/ directory (you'll need to be either root or the apache user to do this) and the web server will
be able to find it. Then just point your browser to
http://localhost/testpage.html and it should display the page as before.
To run these examples, you need to run the php inside Apache, so make sure you've got the php and libphp packages, and that apache is running properly with the above html pages.
Now let's edit the previous page to put a couple of simple php tags to test the PHP:
Another good tag to experiment with is
<?php phpinfo(); ?>. Try it!
From here, there's a load of stuff you can do to create dynamic web pages, but make sure wherever you're planning to host the pages can also cope with php. It's the kind of thing that doesn't come as standard service so shop around.
There's a separate page on Perl, but for now we'll just remark that Perl goes very well together with web programming, where the perl generates pages on the server side in a similar way to the PHP above. Perl has very powerful text-manipulation functions though, so is well-suited to processing forms and parsing inputs.
If you install the apache-mod_perl package, you'll get built-in support for Perl in the web server. To try it out, just
point your browser at
http://localhost/perl/test.pl which should have a test script waiting for you.
See the Perl page for more about the language and what you can do with it.
I use a simple text editor, Kate, for HTML and web programming - it's included in the KDE and provides all the basic editing tools for the source code that you'll need. It provides colour-coded syntax highlighting to help spot typos but it isn't a wysiwyg web editor. For a specialist, dedicated tool for web programming, try Bluefish which provides a great deal of shiny, advanced features and support for very tight control of the generated code. It gives plenty of help and editing functions but the code is still yours. Similar functions are available in Quanta Plus, but I personally find the interface much more cluttered and confusing.
Other tools that you could try include Openoffice Writer (also comes as standard) and in the "Save as" dialog choose HTML as the file type. You could also try Netscape composer for basic HTML but it won't be able to cope with complex stuff like PHP.