Category Archives: General

My First Mac

Today, I purchased my first Mac. It’s a Mac Mini 1.42GHz with Combo Drive to be precise. Set up was a breeze, everything came preinstalled and I just had to fill in my details such as name, password, contact details, etc. and it’s all ready to go.

The software update feature is also easy; it immediately let me know what needed to be updated and just a few clicks later, it started downloading and installing. In some ways, it’s even easier than Windows Update. Additionally, I also downloaded and installed Firefox versions 1.0.7 and 1.5rc2 with ease and I must say that dragging an icon to the Applications folder is a much quicker and easier installation than any Windows installer.

Now that I’ve been playing with it for just a few hours, I’ve already managed to connect it to my phone via bluetooth, synchronise my calendar and contact information (which I couldn’t do on Windows without resorting to MS Outlook and, naturally, I refused to do that. I’m quite sure I’ll have a lot more to play and experement with as I learn the ins and outs of OSX.

One difficulty I am having, though, is that the keyboard shortcuts I’m used to don’t seem to function in the same way that they do on Windows; at least not not in Firefox as I’m writing this. For example, the home and end keys go to the beginning and end of the text area, rather than the current line; I have to use ? where I would normally use Ctrl; and my usual undo (Alt+Backspace), cut (Shift+Del), copy (Ctrl+Insert) and paste (Shift+Insert) don’t work, I have to use ?+Z, ?+X, ?+C and ?+V instead.

Well, I’ve got a lot to learn, and not much time to do it. Any usage tips to help me out with this new toy would be greatly appreciated.

Web Developer Quiz Answers

These are the answers to last week’s Web Developer Quiz. If you have not attempted the quiz yourself, I recommend you do so before reading the following answers. All the responses to the quiz from ealier this week were made public earlier today.

Validation

There is only one error within the sample document, validate it and see for yourself:

Line 4, column 11: there is no attribute “ALIGN”

The align attribute is not valid in HTML 4.01 Strict because it is deprecated. It is valid in HTML 4.01 Transitional. For information about why line 7 isn’t an error, refer to the validation quiz and associated answers I published earlier.

Elements in the DOM

There are 3 p elements within the document. The syntax: <> in an empty start-tag, an unsupported SHORTTAG feature from SGML. It basically means to open the most recent unclosed element. Similarly, </> is an empty end-tag which ends the most recent open element.

The em element will not be present because, despite appearances to the contrary, it is actually commented out. The head and body elements will still be present, even though their start- and end-tags have been omitted.

Validate it and look at the Parse Tree to confirm these answers.

Semantics

The unordered list (option 3) is the most semantically correct. A stylesheet may be used to style it in any way desired.

The <h1> element without the style attribute or the class attribute with a presentational class name is the most appropriate markup for a document title. An external stylesheet may be used, and is the recommended way, to horizontally centre it in a visual medium using a large, bold font. The use of the style attribute or the presentational class name is not recommended because it fails to separate the markup from the presentation.

Everyone got these 2 questions correct. Well done. In hindsight, I wish I had made these more difficult, but since semantics is not an exact science, I found that (in general) the more complicated the question, the less specific the answer could be. So, I settled for relatively easy questions for things that beginners tend to markup poorly.

Character References

  • For an HTML 4.01 document: the numeric character reference: &#146; and the character entity reference: &apos; are invalid.
  • For an XHTML 1.0 document: technically, none of them are invalid; however the numeric character reference: &#146;, while it is not prohibited in XML, refers to a Unicode control character and should not be used anyway.
  • For a generic XML document with no DTD, only the character entity reference: &rsquo; is invalid. &apos; is valid because it is one of the 5 predefined entities in XML.

Since few people correctly answered these questions, I will be providing more information about this in tomorrow’s post.

Media Types (MIME)

An XHTML 1.1 document SHOULD NOT be served with the text/html MIME type. See the XHTML Media Types Note for more information.

An XHTML 1.0 document MAY be served as text/html when the document conforms to the Appendix C HTML Compatibility Guidelines in the XHTML 1.0 Recommendation. Those who pointed out that this is ludicrous get a bonus point.

If any of you have any questions or comments regarding this quiz, please feel free to let me know. The feedback I have recieved, or will recieve, regarding this quiz will help me a lot with the next one I’m planning, which will most likely be a CSS quiz of some kind, possibly followed by a JavaScript/DOM quiz if I have time. Beyond that, well, you’ll have to wait and see.