Twitter seems to be using an <i/> tag to display their icons from a css sprite. Did they just make up that tag, or is HTML I’ve never heard of?
Brilliant idea at any rate 🙂
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That’s the regular italics tag, but without any contents; i.e. it’s semantically equivalent to
<i></i>.†In XML, empty elements are written with an extra slash at the end. XHTML is valid XML. So
<i/>is fine. For a more common example, think of e.g.<br />.To see for yourself that
<i/>is a valid XHTML tag, check the XMLEmptyElemTagdefinition or pass the following to the W3C validator:† As Toji correctly points out, the syntactic difference is relevant under certain circumstances. Though browsers may not treat
<i/>any different from<i></i>, other XML parsers could!