Showing posts with the label JavaScript

Displaying special characters in your HTML and JavaScript

Occasionally I have the need to display umlauts or other non-standard Latin and Kanji characters in my HTML, JavaScript, and as a URL parameter. Each form have their own rules for encoding the characters to display correctly. HTML: Use the HTML name or HTML number. For example & and " for ampersand and quote, respectively. JavaScript: Use the Unicode equivalent. For example \u00E4 and \u00FC to add an umlaut over an 'a' or 'u', respectively. URL Parameter: Use HEX codes. For example, %20 and %2F for a space and forward slash, respectively. Here's a great reference from for the necessary codes.

Test your knowledge of CSS and JavaScript

From my experience, many web developers do not know the finer points of HTML, JavaScript, and/or CSS. They've relied on a combination of built-in language tags (e.g. in place of JavaScript) and designers to do this work for them. How good are you? The site (which I find to be a good reference site) has a 20 question CSS quiz and 20 question JavaScript quiz that will separate the knowledgeable from the not so. On the CSS quiz I scored 17 of 20 -- 2 of the 3 were syntax questions that I know I don't know, and always find myself looking up. For the other miss, I learned something new. For the JavaScript quiz, I scored 18 of 20 -- one being a math function that I missed, and I would expect to have to look up. The other... I shouldn't have missed. Give it a shot and see how you score. Have fun.