Jump to content

What Order Should You Take The Classes In?


wordsmith25

Recommended Posts

I started with the HTML tutorial, then took the XHTML tutorial, and now I'm taking the CSS tutorial, but I'm totally confused. For example, what's a "class" and when do I use it? I oversee intranet pages, using SharePoint and FrontPage but wanted to understand how the pages are really made, so I thought I'd take the training, but I'm really getting confused. What's an "xmlns"? What's a "presentational feature" in HTML? I know what it means for a document to load, but what does it mean when a document unloads? You get the idea about how confused I am.

Link to comment
Share on other sites

That's a lot of questions. :) Starting with HTML was the right idea. Moving on to XHTML is apt to be confusing, since it's really only useful if you're using XML, and most people don't at the start (really, most people don't use it at all because IE support is poor). Most good designers use HTML with a STRICT doctype. Some use strict XHTML, but I suppose the goal is to be ready for the future, because you currently gain no real advantage from it. Anyway, xmlns is an XML concept you can safely ignore for now.CSS is a good place to go next. Presentational attributes in HTML are hard coded right into the HTML, as when you have <table width="100" height="300">. Old-style HTML allowed presentational attributes all over the place. Since 1999, however, most are deprecated (cannot be used with a strict doctype) and have been replaced by CSS.You didn't mention Javascript, but that's mostly where you think about documents loading and unloading. An unload event is fired when the user closes the window or tab, clicks on a link or bookmark, drags a new source into the window, or quits the browser. Most designers don't need to know about it. But imagine your page has a form on it that gets sent to a server. A user might try to unload the page before submitting the form, and this might be a mistake. If you're listening for the unload event, you get a chance to ask the user if he or she wants to submit the form first.Lots of tutorials use a little bit of Javascript to teach you things, so you're bound to be exposed to it. But I would get a strong handle on HTML and CSS before seriously studying Javascript.

Link to comment
Share on other sites

I would learn languages in this order if I went back and learned everything again:HTML - CSS - JavaScript or VBScript(I recommend JavaScript) - XML(optional) - XHTML (optional) - PHP

Link to comment
Share on other sites

I would learn languages in this order if I went back and learned everything again:HTML - CSS - JavaScript or VBScript(I recommend JavaScript) - XML(optional) - XHTML (optional) - PHP
learning VBScript is a waste of time because it only works in Internet Explorer. If you can't code your site for all browsers you can't get a job anywhere.
Link to comment
Share on other sites

A "class" can refer to a number of things, but I suppose you're reffering to the CSS concept. In CSS, a "class" is a group of HTML elements. Once you label certain elements being of a certain class, you can target all of them with a class selector. To label an elenent being of a certain class, you use the "class" attribute.Example HTML snippet:

<p class="mustRead">OHHHH!!!!</p><p>Khm...</p><div class="mustRead">OMFG</div><div>bla bla bla...</div>

example CSS:

.mustRead {/* Target all elements with a class "mustRead" */color:red;}p {/* Target all "p" elements, regardless of their class (if any) */background-color:blue;}div.mustRead {/* Target all "div" elements that have a class "mustRead" */color:green;}

I'll save you another go that newbies often ask: While classes label a group, CSS can also work on IDs to target a specific element that appears on a page. For your page to be valid (validation is the first step towards a page that works across browsers; XHTML should've tought you that) you must use IDs only once per page (i.e. don't use the same ID twice per page), whereas you can use classes multiple times. In cases of conflicts (a class selector and ID selector matching the same element and trying to override the same property), the ID selector would take precendance over the class selector.

Link to comment
Share on other sites

Thanks so much! That was exactly the kind of information I needed to know. I don't really get much chance to use this knowledge at work--large corporation with a "collaboration support team" that handles most of the backend stuff--but I'll practice it at home and maybe do some work for a charity to cement my knowledge. I'll keep going with the CSS tutorial, then take the JavaScript one. And while I really appreciate the information on classes from boen_robot, I'm afraid I'm still fuzzy on what all that code is supposed to do and what the results will look like. I'll have to go play with it and see what happens.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...