CyberD.org
C:\ Home » Archive for "Code" (?) (Page 8)

Double Quotes With <q>

I read recently, that back in 2008 you could get double quotation marks in Firefox if you added quotations within a <q> tag, since FireFox generated them by default, whereas IE (the most popular browser back then) didn't output any quotes at all. So people either added quotation marks or didn't, and they would appear either without quotations in IE and with quotations in FF, or with quotations in IE and with double quotations in FF. The end result of this problem was that many designers stopped using the <q> tag to avoid any issues. The question is, is this still a problem today? The article was written at the time of IE 6, and it seems IE 8 has the same problem. Don't know about latter versions though. Maybe it's already fixed.

If not, I suppose the best option would be to create a stylesheet reset so that browsers can't add anything unwanted to your page, then you add the quotations, or not, as you wish. Here's another quick workaround I found which you could add to your CSS file:


q:before, q:after {
  content: "";
}

When adding a quote, you would then need to add quotation marks outside the <q> opening and closing tags for them to appear. If you don't want quotation marks, you wouldn't need to do anything, this CSS would get rid of them, on all browsers. Just so you know, this is how inline quotes appear here at CDB.

The DFN Tag

The <dfn> element is for special terms.

Ever used the <dfn> tag? It stands for definition. It's used to introduce or explain a specific key term within a document. If I was writing a tutorial about HTML, and I was just going to start explaining what HTML was, then I could use the <dfn> tag like this: HTML is...

The tag may include common attributes, such as title (which I did not use above). An even better choice might be to include it within another tag, such as <acronym>, and use that tag to define a title. In the example above that would probably be much better since HTML is an acronym as well as a key term in the document.

But still, wouldn't the regular acronym or abbr tags suffice for introducing new terms? Where would a dfn tag find a greater purpose? I wonder if this tag will get deprecated in future XHTML versions.

Difference Between Acronym & Abbreviation

Two tags that I've been using more and more over the years are <acronym> and <abbr>. Well actually, <acronym> is the only one I've really been using. Sometimes I type in acronyms manually, but for the most part I have a script that parses a specified set of acronyms and adds a title attribute to them so they show up like this: HTML, XHTML, NG, CDB, WWW, ETC. I have about a hundred acronyms listed, and they're all acronyms, I think... so when is the abbreviation tag actually used?

It turns out an acronym is a term that is formed from the initial letters of a longer word or phrase, is pronounced differently from the original and can be pronounced as a word. NASA is an example of an acronym. An abbreviation, on the other hand, is pronounced (at least partially) the same as it's initial form, though it is written differently, such as Mr. instead of Mister. In fact, the ETC I have included above is not only an acronym, but also an abbreviation for Etcetera. The tool-tip displayed for ETC is really for the abbreviated version, not for the words that E T & C really stand for as an acronym. Most words can be abbreviated, as can places, dates and names. Beth, for example, is an abbreviation of Elizabeth, but most probably you won't need to add an <abbr> tag for names. I mean, if you call your friend Beth, why would you need to explain to the world, through a tool-tip, what her real name is? As for Bob (I am so called), it's one of few names that is both an acronym and an abbreviation. Or is it? Can Bob really be an abbreviation of Robert? With Beth, the name is a shortened yet similarly pronounced version of Elizabeth, but with Bob and Robert the similarities are much less! With Bobby, though, it's clearly an abbreviation.

To complicate matters a bit, there are also initialisms. All the acronyms I've listed above (except for ETC) are actually initialisms. They are much like acronyms in that they are made from the first letter in a string of words, yet they cannot be pronounced as a word. Yet there is thankfully no tag for initialisms, so they are logically grouped as acronyms, as they are certainly not abbreviations. So, to sum things up, acronyms are made from the first letters in a string of words, abbreviations are shorted forms of words, and the majority of acronyms are really initialisms, acronyms that cannot be pronounced as a new word. Also, acronyms are a subset of abbreviations, so all acronyms are really abbreviations, but not always vice versa!

Did you get any wiser? ;)

Relearning The Basics

I've known HTML, XHTML and CSS since back in 2003-2004, and since then I've been constantly teaching myself new things, eventually adding to that static-coding knowledge with PHP, SQL, flash and JS as well. Along the way I started working with scripts like phpBB and punBB and WordPress, and whaddayaknow, I became a pro. :)

At least that's what I thought, but then I bought myself a real book (800 pages) for a university course I'm reading, about web-design basics, and apparently (it shouldn't be so surprisingly) there's a lot that I've missed! New realizations pop up all the time, along with questions and curiosities, as I learn things that would have made life so much easier when I first started designing. Like the fact that <blockquote> can't be inside a <p> because they're both block elements, or that <span> is inline and <div> is block, and that's why you can't put a <div> within a sentence. How did I survive without such fundamental knowledge earlier? Learning things from the ground up is probably the best method.

I decided to start up a new category to post bits of code and revelation that might be useful to know. Hopefully they'll come in handy now and again. And if your looking to learn the basics yourself, the book Beginning Web Programming with HTML, XHTML, and CSS by Jon Duckett is much recommended! It's not just for the newbies, but for anybody who wants to learn the language properly. So far it's been fun to read, too, and I've learned the best recipe in the world for scrambled eggs. Haven't had time to test it yet, though. ;)

The F&%¤ed CSS

I was working on a CSS file, opened it up in Wordpad to change a line, reloaded it in Dreamweaver, tested the site a few times while saving the file and left the computer alone for a while to complete a large file transfer between drives. Came back and opened up my site and it was displayed without styling, so I opened up the CSS file to see if I made missed a } or something. Imagine my horror when the whole file is blank, just blank, and it's still 5,8KB! I suppose that means the file is corrupt.

I've googled all over the place without finding a solution to the problem, and I've never had this problem before either. I've switched between Wordpad and Dreamweaver a lot, but I guess things are different with either the new Wordpad or the CS3 version of Dreamweaver. Part of the file was based on my old CSS, but most of it was new stuff I had been finetuning for at least half a day this week making the new design as perfect as possible. Was going to post a quick snapshot of the new design so far, but now I'll have to rework the entire CSS file instead. This too, sucks.

Cybedevilian Design

Need something done? I can do it. Post requests in the comments or send me a PM or an email to (email removed, contact me here). If you need something small like a logo, a few site images, help with a certain script, etc, I can do that for free. For larger projects I work at a pace of $10/hour.

What I do

- Static or Dynamic websites
- Flash Animations
- Soundtracks
- Voice Acting
- Site Graphics
- Site Layouts
- PHP Scripts
- Translations
- Brand names/slogans
- Vectors
- Lyrics

Programs I work with

- Photoshop CS2
- Adobe Illustrator
- Maromedia Flash 9
- Fireworks Fireworks
- Macromedia Dreamweaver
- Macromedia Flash 8
- Fruity Loop Studios 4
- Dance Ejay 7
- Hiphop Ejay 6
- Techno Ejay 4
- Audacity
- Wordpad
- Filezilla

Programming Languages I use

- HTML
- CSS
- PHP

I Design Whatever

Privacy   Copyright   Sitemap   Statistics   RSS Feed   Valid XHTML   Valid CSS   Standards

© CyberD.org 2025
Keeping the world since 2004.