Click to See Complete Forum and Search --> : Wondering about HTML and other things
Chrisab508
01-27-2004, 09:07 PM
Hi,
I'm just getting into HTML. I have a few questions. I know that every page is written in HTML, so what is javascript? CGI? and PHP? also, with just using HTML, how do you get well designed pages? like www.csnation.net is a pretty well designed page with lots of things, and Im just not seeing where all of it comes from with just HTML code.
thanks!
chris
fredmv
01-27-2004, 09:30 PM
Welcome to the forums.Originally posted by Chrisab508
so what is javascript?JavaScript is a client-side (i.e., it runs on the user's browser and therefore, the user's machine), object-based scripting language. It is used for dynamic client-side effects. For example, I'm sure you've seen "rollovers" before. Rollovers are when you mouseover an image and it changes to another image — then, when you mouseout of the image — it changes back to the original. That is JavaScript in action. Of course, that is one of the much more simple uses for it. Note, however, JavaScript can have much more powerful applications (e.g., games, calculators, etc.). Originally posted by Chrisab508
CGI?CGI — Common Gateway Interface — isn't a lanugage in itself. It is basically several rules in which govern how a server communicates with another piece of software. You can write CGI applications in basically any language — Perl (Practical Extraction and Report Language) is generally the most common one. With CGI you can create server-side (i.e., it runs on the server) applications. Server-side applications usually do things like send mail, connect to databases, etc.Originally posted by Chrisab508
PHP?PHP — PHP: Hypertext Preprocessor — is another server-side language. PHP is also open-source (i.e., the source code is accessible to anyone and can be legally modified) which is another huge advantage. As mentioned previously, server-side languages are used for things like sending mail and connecting to databases — usually intended for generating dynamic content. PHP would be a very smart choice for a server-side language to learn because it is available on many hosts — even some free ones — and there are a lot of people willing to help since it's become a very popular server-side scriping language.Originally posted by Chrisab508
also, with just using HTML, how do you get well designed pages?The thing is, it isn't only markup — it's CSS as well. CSS — Cascading Style Sheets — is the most practical way to add style to your markup. If you want a decent introduction to CSS, you might want to consider heading over to W3 Schools (http://www.w3schools.com/css/).
Chrisab508
01-27-2004, 09:36 PM
WOW, thanks a lot man. One more question, what out of all of those would I need if im making a website for a friend of mine for her business that she started a couple years ago?
Chris
fredmv
01-27-2004, 09:42 PM
It would most likely be a combination. If the site requires users to register and things like that, a server-side language will, indeed, be required. For client-side functionality (e.g., client-side form validation, etc.) you will need JavaScript (note, however, you should validator forms on the server-side as well). For styling the site, CSS will be used. So the list of technologies comes down to this, basically: XHTML — the site will be written using this markup language (it's basically the same as HTML — it's HTML 4.01 reformulated as an XML 1.0 application). CSS — markup will be styled with this language. JavaScript — forms will first be validated on the client-side with this scripting language, and other possible client-side functionality. PHP — for all server-side functionality such as a user system, form validation (first a check on the client-side, then server-side) and other possible server-side functionality.
Chrisab508
01-27-2004, 09:46 PM
ahh crap, wow All I know is HTML and I am currently learning about CSS, so what would XHTML change? anything?
fredmv
01-27-2004, 09:56 PM
XHTML is good because you can use it along with other XML applications (e.g., MathML, SVG, etc.). Note that using XHTML also makes your content available to more devices (e.g., PDAs, cell phones, etc.).
Chrisab508
01-27-2004, 09:57 PM
How do I use XHTML? for normal HTML i just write it in notepad, how do i use XHTML?
thanks
Chris
fredmv
01-27-2004, 10:01 PM
Just the same. You might want to consider checking — yet again — W3 Schools (http://www.w3schools.com/xhtml/) for a decent introduction to XHTML. ;)
Paul Jr
01-27-2004, 10:02 PM
http://www.w3.org/TR/xhtml1/
Looks like ya beat me to it, Fred. ;)
Chrisab508
01-27-2004, 10:03 PM
Okay, thank you so much, you have been a great help. One more thing, as we are speaking I am reading a CSS tutorial online. A website like www.csnation.net which has a very good design (in my opinion) was CSS used to design this? If so, then I'm guessing it was very complicated CSS.
Thanks.
fredmv
01-27-2004, 10:04 PM
Originally posted by Paul Jr
http://www.w3.org/TR/xhtml1/The offical W3C documentation on technologies such as XHTML is, indeed, the best reference possible. But for beginners like we have here it isn't exactly a starting point. A tutorial written for beginners — prehaps a little less technical — is usually easier to start out with for someone new to the technology as opposed to diving into the documentation.Originally posted by Paul Jr
Looks like ya beat me to it, Fred.Yep. Not by much though. :pOriginally posted by Chrisab508
was CSS used to design this? If so, then I'm guessing it was very complicated CSS.CSS was definitely used for the text, links and and other visual things you see. However, they're using what is considered a very bad practice — tables for layout. Since you're just starting out, you might not be aware, but tables for layout is stupid (http://www.hotdesign.com/seybold/). If you're curious as to how the CSS looks for that site, simply view their source. In their case, the CSS isn't very complex — all it's used for, really, is text and links. In sites that take full advantage of CSS, the entire layout is powered by CSS (e.g., mezzoblue (http://www.mezzoblue.com/), simplebits (http://www.simplebits.com/), etc.).
spufi
01-27-2004, 11:05 PM
And the two standard sites I have bookmarked for inspiration in using CSS.
http://www.9rules.com/cssvault/
http://www.csszengarden.com/
When you check out CSS Zen Garden, you'll notice that each of the designs use the exact same markup file. The only thing that is changed is what CSS file they are linking to. All images are defined as backgrounds in the CSS too.
ray326
01-27-2004, 11:20 PM
A website like www.csnation.net which has a very good design (in my opinion) was CSS used to design this? Well he sure tried but there's a major failure down the left side so I suspect he's only reviewing his site with some version of IE.
Chrisab508
01-28-2004, 09:12 AM
okay, so i was looking at the XHTML tutorial on w3 schools, and i noticed on the top it was /xhtml_tutorial.asp, why is it .ASP and not .xhtml?? They said the site was in xhtml
thanks.
spufi
01-28-2004, 10:50 AM
XHTML doesn't have it's own extension, so using a html extension works instead. However, since ASP was used, the .asp extension is used so the server knows ASP was used within the page and that the server needs to process it. Just like if I use a page with XHTML and PHP. I am going to use the .php extension so the PHP code gets processed. There's nothing special the server has to do to process XHTML.
Chrisab508
01-28-2004, 11:58 AM
So, ASP is just a server side command language or whatever its called, like PHP?
thanks again.
Robert Wellock
01-28-2004, 01:25 PM
An ASP is a type of Snake, but yes I suppose you can call it a server-side scripting language like PHP
fredmv
01-28-2004, 01:39 PM
Originally posted by spufi
There's nothing special the server has to do to process XHTML. In the exception that you send it as an application of XML (e.g., application/xhtml+xml).
Chrisab508
01-28-2004, 05:16 PM
lets say I wanna make my hyperlinks so that after they're clicked they stay the same color and also that when the cursor is over them they become underlined. Would I use Java, or is there a way in CSS to do this? im thinking there is...
thanks!!
Paul Jr
01-28-2004, 05:18 PM
http://www.w3schools.com/css/css_pseudo_classes.asp
Chrisab508
01-28-2004, 05:21 PM
Thanks! i think this means I don't need to use java, because at the beginning stages of my website im not gonna have a shopping cart or have people register, just something simple. Maybe it'll get more complex later!
Paul Jr
01-28-2004, 05:23 PM
Originally posted by Chrisab508
Thanks! i think this means I don't need to use java
Yup, that's correct. ;)
CSS is a very powerful language, I believe it is a must nowadays.
Chrisab508
01-28-2004, 06:01 PM
I know, I keep bringing up www.csnation.net, but I have one more question. On the left side and right side it is black and then in the middle it is blue, how do u get taht split? i know you can do it with frames but have heard frames are bad to use for design.
Thanks.
ray326
01-28-2004, 08:14 PM
In really simple terms it looks like this.
<style type="text/css">
h1 {
color: white;
text-align:center;
}
#left {
float:left;
width:20%;
background-color: black;
}
#middle {
float:left;
width:60%;
background-color: darkblue;
}
#right {
float:left;
width:20%;
background-color: black;
}
</style>
</head>
<body>
<div id="left"><h1>left</h1></div>
<div id="middle"><h1>middle</h1></div>
<div id="right"><h1>right</h1></div>
</body>
Chrisab508
01-28-2004, 08:17 PM
thanks, thats really cool, how do I make it extend all the way to the bottom?
Chrisab508
01-28-2004, 08:39 PM
well, how would I put that in a CSS format? i put that in my CSS stylesheet and it didn't work.
thanks.
ray326
01-28-2004, 09:52 PM
Well the stuff inside the style would go in your style sheet and the HTML goes in the body. I'd say take that code off to w3schools and figure out what it does from there. You'll learn a lot more that way.
Chrisab508
01-28-2004, 10:35 PM
k ray326, I got it all sorted out and in my document, just one last question and then im good to go, how would I make those three colors extend all the way down the page? or three sections i should say.
thanks.
Chrisab508
01-28-2004, 10:38 PM
okay, i kinda solved my own problem by adding a :
{height: 500px;}
or whatever value, except I don't think that thing is a background, what I need is those colors to be background so that I can place things ontop of them.
thanks.
spufi
01-29-2004, 12:05 AM
You might want to look at this article.
http://www.alistapart.com/articles/fauxcolumns/
ray326
01-29-2004, 12:43 PM
Originally posted by Chrisab508
okay, i kinda solved my own problem by adding a :
{height: 500px;}
or whatever value, except I don't think that thing is a background, what I need is those colors to be background so that I can place things ontop of them.
thanks.
If you just add that to each of the rules then the backgrounds should act right. I certainly second spufi's suggestion.