Skip to content
Archive of posts filed under the HTML category.

Filtering MS Word Text

A common annoyance when dealing with user-supplied content is the way MS Word uses some non-standard character encodings (at least non-standard in terms of the web). Among others, these include the directional (a.k.a. “smart”) quotes. The problem occurs when you output text that contains those characters as a result of a user copying and pasting [...]

Tabbed Ouput with Tidy

In response to this thread at WebDeveloper.com, I came up with the idea of using PHP’s Tidy functions to format the HTML output from a script. The basic idea was to capture all the output by using ob_start() to buffer the output and then ob_get_clean() to save it to a variable. Then just run it [...]

Most Used Words in File

I recently saw a question posted in a forum about obtaining the most-used words in a file for the purpose of populating the content of a “keywords” meta tag. It got me thinking about how I would do it. I knew I could use the str_word_count() function to count words, but running that against any [...]

Clearing the Floats

No, this has nothing to do with the aftermath of the Macy’s Thanksgiving Day Parade. This is about that annoying thing with floated HTML elements within a container element, whereby it seems that said container has no inkling of the fact that it should expand enough vertically to contain any and all such floated elements.
I [...]