
|
View Full Version : Learning HTML
AmyDaynes 08-12-2005, 05:45 AM Hello
Being an inspiring (but somewhat novice) aspipring Web Designer, I need to learn HTML and eventually other scripting languages. What is the best (and ideally quickest) way to learn HTML? Is experience the best tutor or taking a proper course? What other scripting languages do you feel would be useful for me to learn?
Can anyone advise?
Thanks in advance,
Amy x
forumrating 08-12-2005, 06:58 AM Best way should be learning with tutorial online,
http://www.w3schools.com/html/
also make sure you practise enough to be able to get your basics right, once you are fine with the basics , after that try working with softwares, and later go for other language like php wich is used a lot these days.
RoyFeni 08-14-2005, 06:25 AM I agree about http://www.w3schools.com/html/, but let me add this: AVOID PAGE AUTHORING PROGRAMS LIKE THE PLAGUE! Use Notepad or something; you'll learn lots more.
Froggy 08-14-2005, 07:17 PM You may want to get a book on the topic at times the a lot of the online help are more for people that already know it and just needed to be reminded how to do something. O'Reilly in general has great books on all language related topics.
I would agree that avoiding page authoring programs is good to as you won't learn much with them, but having a editor that formats the text and does syntax highlightly is very useful. xemacs does this and you can download it for free. There is a version for windows that works good. There are other free editors that will do similar things.
Also I would suggest learning html and CSS together. By doing this you'll avoid a lot of bad habits. After you've got CSS and html down you should learn some javascript. For web design you'll generally only need to know html/css/javascript. But if you want to do some server side scripting than PHP would be a good language to start with on that front. Note: server side scripting is executed on the server and is used when you want to add some sort of dymanic content to your site.
bigdavestar 08-14-2005, 07:57 PM Paper courses aren't good with things like this...mostly because the people teaching it aren't upto date with current standards.
www.htmlgoodies.com and www.w3c.org are both great resources to learn in your own time.
AmyDaynes 08-15-2005, 04:11 AM Thanks for all this advice!
What is the difference between HTML and CSS and PHP?
Is javascript for interactive content?
Froggy 08-15-2005, 05:36 AM HTML is a mark up language used to create webpages. CSS was created as a way to move styling out of the html (things like font color etc). CSS also gives you the ability to do many things that pure HTML does not.
Javascript is a client side programming language that can be used to make the site more dymanic. For example lets say for some reason you wanted your site to do different things based on which broswer is being used, you can get that information with javascript.
PHP is rather different than the above. PHP is a language that runs on the server and is used to create dymanic content, for example if you need to have a login feature to your site to get at certain resources you could use PHP to do this.
Start with HTML and CSS, I don't think things like PHP are going to make much sense until you know HTML/CSS.
AmyDaynes 08-15-2005, 06:25 AM So am I right in thinking you can mix different scripting languages in the same page?
Would it be sort of like this?
<html>
html stuff
</html>
<php>
php stuff
</php>
<html>
html stuff
</html>
<css>
css stuff
</css>
By the way, I know my php and css tags are wrong! I've never even seen a php or css script! Lol.
AmyDaynes 08-15-2005, 06:27 AM Originally posted by RoyFeni
AVOID PAGE AUTHORING PROGRAMS
What are these?
anon-e-mouse 08-15-2005, 07:05 AM That is WYSIWYG (What you see is what you get) programs like Front Page. They are fine for beginners, but if you make a change to the page later with the same editor, it could stuff up the work you previously had looking nice, this is where html knowledge comes in. Further editing of your original page done in a WYSIWYG editor should be done in a text editor where you can place changes using your html knowledge.
So use the links placed above to get the general feel for html. They are good guides :)
AmyDaynes 08-15-2005, 07:28 AM I will do! And thanks again for your help.
I had a play around on FrontPage right at the start of my web design venture and as soon as I published a page to the web it, what I can only describe as, 'corrupted' in the browser! I vowed then I would avoid them in the future!
I have been playing around in Dreamweaver where you can use the design or coding view. Would you still advise using the coding view to design pages? Or a bit of both?
dollar 08-15-2005, 07:29 AM Originally posted by AmyDaynes
So am I right in thinking you can mix different scripting languages in the same page?
Would it be sort of like this?
<html>
html stuff
</html>
<php>
php stuff
</php>
<html>
html stuff
</html>
<css>
css stuff
</css>
By the way, I know my php and css tags are wrong! I've never even seen a php or css script! Lol.
Go ahead and try this out here:
We're going to create 3 different files.
File One - HTML: Main Page - Save As: index.php
------------------------------------------------------------
*NOTES*: Saving the file as .PHP allows us to use PHP Code within the document. This does not mean the entire document must be PHP. You can save a file as .php and use nothing but HTML if you wish.
<html>
<head>
<title>Mikey you rock!</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php include('header.php'); ?><br />
<br />
Content!
<br />
<br />
</body>
</html>
Thad one is pretty straight forward for the most part with HTML. We do have our first PHP statement in it though, so let's examine that a little bit.
The PHP code is included between two tags (as you mentioned you knew yours were wrong). These tags are:
<?php
and
?>
*NOTE*: You can use simply <? instead of <?php but it is not reccomended as some webservers may not recognize it.
Now we understand how to define our PHP code, lets look at the actual code a bit more in depth.
include('header.php');
This is a very simple piece of code. We are telling the webserver to "include" the file header.php.
The include function without the target item to include would look like this:
include()
We enclose the item we are including in quotes. You can use either:
' or "
it is more a matter of preferance than anything else. This allows the server to understand exactly what file to include. You could do something like this:
include("/inc/layout/header.php")
if you wanted to. Now the last part is the semicolon. Every line of PHP code must be ended with a semicolon. PHP does not read it's code line by line, but instead it reads it until it finds a semicolon, then processes that text as one line of code.
For example try this in your spare time.
Make a file called test.php and put this inside of it, then view it on a webbrowser:
<?php
echo(
"
T
h
i
s
i
s
c
o
o
l
"
)
;
?>
So with that we understand that simple PHP statement. Now that we have that we are going to create our header.php file.
File Two - HTML: Header File - Save As: header.php
------------------------------------------------------------
*NOTES*: This file is an example of a header that we would want to look the same on every page of our website. By using this in a PHP include, we can have hundreds of pages, but only one header.php file. That means if we need to chnage how the header looks, we can change the one file instead of having to update all 1525 individual pages.
<br /><span class="header">This is my header!</span><br />
Now that wasn't too hard to do was it? Not at all! You might notice something in that file that you aren't too familiar with and that is the class statement. Well I had to slip that one in on you! That is the start of CSS! A span is a very simple way of setting how a block of text looks. Everythign between the span will be formatted according to the "class" we are going to create in the next step!
File Three - CSS: Stylesheet - Save As: style.css
------------------------------------------------------------
.header {color: #5E88A8; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16px; font-weight: bold;}
This file may look a bit crazy at first but it is not hard to understand when you get down to it.
.header is the name of our class
All the details in the class are in-between the curly brackets {}
The first directive is the color of the text, in this case:
#5E88A8
We preface that with a : to show the start of that information
and we end it with a semicolon (much like PHP).
Next is the font used. We list a few here in case the user does not have the first one in the list. If they don't have the first one it will work it's way through until it finds one they do have.
The next statement says that the font size should be 16
The final statement says to make the font bold.
Now that you have all three files upload them to a PHP enabled webserver and go to the index.php file!
If you have any questions or if I messed something up feel free to post, PM, or E-mail me!
dollar 08-15-2005, 07:33 AM Originally posted by AmyDaynes
I will do! And thanks again for your help.
I had a play around on FrontPage right at the start of my web design venture and as soon as I published a page to the web it, what I can only describe as, 'corrupted' in the browser! I vowed then I would avoid them in the future!
I have been playing around in Dreamweaver where you can use the design or coding view. Would you still advise using the coding view to design pages? Or a bit of both?
You will hear from most of the web-designers here that notepad (hand coding) is the way to go with any type of webdesign, and for the most part they are right, but I personally enjoy using dreamweaver to aid a bit in my coding. I do not simply sit in design mode, but usually in coding mode.
With it's helpful indentation and context coloring it just makes things a bit easier for me. I also enjoy the built in spellcheck and validation services. I would suggest learning in dreamweaver, but keeping it on code view and only popping over to design or split to check on your progress. Once you know how to write all the code yourself, then you can learn to use it to help you get things done quicker.
AmyDaynes 08-15-2005, 07:46 AM Justadollarhostin,
I cannot thank you enough for all this help. Really really kind of you. I wish I had some knowlege to repay ALL you helpful people out there!
File One - HTML: Main Page - Save As: index.php
I cannot open this in a Browser? It only lets me open it in GoLive and the Preview option from there only displays the word 'Content!'
What am I doing wrong!?
dollar 08-15-2005, 07:50 AM No need for thanks, karma will come around one day I'm sure ;)
You need to have the file on a web-server that has PHP installed. Do you have a hosting account somewhere with PHP?
Froggy 08-15-2005, 12:12 PM Amy, You really should just stick to html/css to start with. You may not even need to learn something like php to do what you want. You can mix html/css together, but the css can't go just anywhere. In general its best to put it in an individual file, this way if you have a lot of pages that you want to have a similar style you can so it on all of them. Then if you decide to change something you only need to change one file. That is the beauty of style sheets (CSS = cascading style sheets).
Also since PHP is a server side technology, you need to have php installed on your computer, you can install php on your computer go to www.php.net, but note that whereever you serve it with has to have php too.
Generally web designers don't touch php at all. But its probably good to know a little bit of it, but it can wait = )
AmyDaynes 08-15-2005, 12:36 PM Thank you for all your help :)
BooyaMcNasty 08-15-2005, 04:54 PM Hi Amy,
Here are some great links for you:
Lots of Links: http://www.kayodeok.btinternet.co.uk/favorites/webdesign.htm
Usability guide: http://www.useit.com/
CSS Links: http://dezwozhere.com/links.html
Colour Schemer: http://wellstyled.com/tools/colorscheme2/index-en.html
Musoka 08-15-2005, 08:57 PM Never buy books(in my opinion). I went around online looking at source files for smaller sites, studying them. Also looking at tutorial sites every so often to get to understand the codes.
I suggest learning very basic HTML, then start looking into things like CSS and Web Standards. Coding to web standards has become very popular today and it is very difficult to get praised for a web design without it being validated perfectly.
innova 08-19-2005, 02:32 PM <?php include('header.php'); ?><br />
Just one thought on this example. Its a matter of debate, but I would argue even to a beginner that you should go to great lengths to avoid sprinkling php sections in your html code. As your site grows, maintenance will become a nightmare.
You didnt really say if your site will have dynamic content or not, so I would echo Froggy's suggestion of taking on one technology at a time.
You would be well to learn CSS to a great degree, and maybe some javascript down the road as well.
guitarguy22 08-21-2005, 01:10 PM I learned html from going on search engines. html is very easy to learn
Website Rob 08-21-2005, 02:15 PM Never be afraid of learning from a Book. Many things are learned that way and you'll find, no matter what your level of knowledge, it is handy to have Reference books available.
And learning HTML / XHTML / CSS couldn't be easier, you can do 95% of it right on your home computer. No Hosting account necessary until you get into scripting languages like Perl (*.cgi *.pl) or PHP (*.php). Even Java and Javascript coding can be done on your home computer.
Froggy 08-21-2005, 04:27 PM No Hosting account necessary until you get into scripting languages like Perl (*.cgi *.pl) or PHP (*.php).
You don't actually need a hosting account to run those, you could install apache + php + perl on your computer, on linux this absolutely trivial. With windows it takes a bit more effort.
I would seriously suggest that anybody doing any programming work (or just html) use linux. Linux is by far the best platform to program on (unless of course you're writing an application in C/C++ that runs on windows or mac!).
|