It works with the 'l' parameter because you created a valid tag inside. Basically, you get something looking like this:
Tags are defined by < followed by a character. As in this case, < is followed by another instance of <, the HTML parser is smart enough to not see the first < as the beginning of a tag.
Thinking along those lines, my original workaround can even be bettered by just using an empty, meaningless tag rather than a hidden portion:
which, would result in HTML looking like this: