Helpful Information
 
 
Category: Coding tips & tutorials threads
FAQ - For HTML, PHP, and so on.

Really Big FAQ

This tutorial will [hopefully] answer most "noob questions" for these areas.

Ok... let's start.

HTML

1. What the hell is HTML?
HTML basically stands for HyperText Markup Language
A HTML file is a text file containing small markup tags (like this: <body>), and the markup tags tell the Web browser how to display the page.

2. Where can I learn HTML?
You can learn it here: http://www.howtocreate.co.uk/ (Suggested by Twey).

3. What does a HTML page look like?
A HTML page basically consists of a doctype, <html>, <head> and <body> tags.

4. How do I make a HTML page?
To start off with, you can use a WYSIWYG editor like Dreamweaver, GoLive etc.
Don't ever use FrontPage.

5. How much is it to make a HTML page?
It's free. Just pull out an WYSIWYG editor like Dreamweaver (BTW, that costs money) or a text file editor like NotePad and start coding!

6. How do I make those page titles like you see on the top of the browser?
In between the <head></head> tags, put <title>Page Title!</title>

7. Oooh!! I found this really easy way to design pages! Use tables!
You should never ever use tables, because they aren't what tables were made for. Tables are used to display tabular data, like listing orders and products, NOT to put images here and there. Use CSS for layout instead, 'cause that's what CSS is designed for.

CSS

1. What is CSS?
CSS stands for Cascading Style Sheets. It allows you to create fancy page designs.

2. How can I write CSS?
Easy! Just open up your WYSIWYG editor like Dreamweaver or GoLive and start coding!

3. How can I link CSS with my HTML page?
If you have your CSS in a seperate file, use this code:


<link href="mycssfile.css" rel="stylesheet" type="text/css">


4. Where can I learn CSS?
CSS is extremely easy. Try this tutorial from w3schools.com (http://www.w3schools.com/css/default.asp).
Or... this one from howtocreate.co.uk (http://www.howtocreate.co.uk/tutorials/css/introduction)

JavaScript

1. What is JavaScript?
JavaScript is a client-side scripting language. Basically, it means it runs on your browser. JavaScript can do really cool things like make clocks on web pages (as seen here on DD), drop down menus, popup windows and so on.
JavaScript can make your web pages a hell of a lot more interactive, and allow rich user interfaces.

2. I want to disable right click, not make people steal my images etc.
Short answer: You can't.
Long answer: Read this (http://www.dynamicdrive.com/forums/showthread.php?t=21964) thread.

3. Is JavaScript the same as Java (and vice versa)?
No! Java IS NOT JavaScript. Java is a completely different language, and is mainly used for gaming. Sun owns Java.

4. Where can I learn JavaScript?
Personally, I'd prefer this tutorial (http://www.tizag.com/javascriptT/).

5. Is JavaScript like PHP and/or ASP.net?
No! PHP, ASP.net and so on are server side languages. They are used to perform behind-the-scenes interaction, like seeing how many visits a month, who logs in etc. JavaScript was only mainly developed for interactive pages.


PHP

1. What is PHP?
PHP stands for PHP Hypertext Preprocessor.


PHP is an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web developers to write dynamically generated pages quickly.

This is generally a good definition of PHP. However, it does contain a lot of terms you may not be used to. Another way to think of PHP is a powerful, behind the scenes scripting language that your visitors won't see!

When someone visits your PHP webpage, your web server processes the PHP code. It then sees which parts it needs to show to visitors(content and pictures) and hides the other stuff(file operations, math calculations, etc.) then translates your PHP into HTML. After the translation into HTML, it sends the webpage to your visitor's web browser.

2. Is PHP free?
Yes! PHP is free and open source. Open source means that anyone can get the program, edit and and distribute it freely.

3. Is PHP run through the browser?
No, PHP is run on the server. If PHP was run through the browser, then it would be a client side language, not a server side language.

4. How can I install PHP onto my computer?
PHP needs a web server to be run on. You can either try building one yourself (very hard if you're a beginner) or get a pre-packaged one like XAMPP (http://www.apachefriends.org/en/xampp.html). XAMPP can be run on Windows, Linux and OSX (Intel only)

5. How do I write PHP?
Just fire up your WYSIWYG editor like Dreamweaver or GoLive and type in your code! Here's an example:


<?php
echo 'hello world!';
?>

That'll print out 'hello world' into your HTML page. Just make sure you create the document as a "PHP Document" or save it with an extension of .php

6. This sounds so cool! Where can I learn PHP?
My personal favourites are this (http://www.tizag.com/phpT/) and this (http://www.php-mysql-tutorial.com/).

7. Can other people see my PHP?
It is almost impossible to view the source of PHP without actually hacking into your server. Not to worry! The casual viewer and developer wouldn't be able to view it.

8. Can PHP create flying aeroplanes and fancy effects?
As said, PHP is a behind-the-scenes language. Once the page has loaded, PHP doesn't do anything to that page. PHP just translates it's code, and outputs it into the browser. Because of this, PHP cannot interact with the user. If you must have Javascript-like effects with PHP, then you can use Ajax to bridge the two.

Databases - MySQL

1. What is a database?
A database is a structured collection of records or data. Like when you go to the doctors, they'll bring out your file with all your visits, medication they've given to you etc.

2. What is MySQL?
MySQL is another database server. It's almost like Microsoft Access (ugh).
MySQL allows you to store information that fits into categories.

3. Where can I learn MySQL?
Try this tutorial out. (http://www.php-mysql-tutorial.com/)

________________________

Just note that this is a work in progress, and it is NOT perfect. If you have anything to add, feel free to post it. :)

Have fun entering the coding world!
~Peter


[Wee!!! Updates]

26 October 2007 - Removed links from w3schools.com as recommended by Twey.










privacy (GDPR)