04.06.2013 Views

Head First HTML with CSS

Head First HTML with CSS

Head First HTML with CSS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Q: Wow, I never knew the browser<br />

could display so many different<br />

characters. There are a ton of different<br />

characters and languages at the<br />

www.unicode.org site.<br />

A: Be careful. Your browser will<br />

only display all these characters if your<br />

computer or device has the appropriate<br />

fonts installed. So, while you can<br />

probably count on the basic entities<br />

from the www.w3schools.com page to<br />

be available on any browser, there is no<br />

guarantee that you can display all these<br />

entities. But, assuming you know<br />

there are no<br />

Dumb Questions<br />

something about your users, you should<br />

have a good idea of what kind of foreign<br />

language characters are going to be<br />

common on their machine.<br />

Q: You said that & is special and<br />

I need to use the entity &amp; in its<br />

place, but to type in any entity I have<br />

to use a &. So for, say, the > entity, do I<br />

need to type &amp;gt;?<br />

A: No, no! The reason & is special is<br />

precisely because it is the first character<br />

of any entity. So, it’s perfectly fine to use<br />

& in your entity names, just not by itself.<br />

Crack the Location Challenge<br />

building blocks<br />

Just remember to use & anytime you type<br />

in an entity, and if you really need an & in<br />

your content, use &amp; instead.<br />

Q: When I looked up the entities<br />

at the www.w3cschools.com, I noticed<br />

that each entity has a number too.<br />

What do I use that for?<br />

A: You can use either the number,<br />

like &#100 or the name of an entity in<br />

your <strong>HTML</strong> (they do the same thing).<br />

However, not all entities have names, so<br />

in those cases your only choice is to use<br />

the number.<br />

Dr. Evel, in his quest for world domination, has put up a private Web page to be<br />

used by his evil henchmen. You’ve just received a snippet of intercepted <strong>HTML</strong><br />

that may contain a clue to his whereabouts. Given your expert knowledge of<br />

<strong>HTML</strong>, you’ve been asked to crack the code and discover his location. Here’s a<br />

bit of the text from his home page:<br />

There’s going to be an evil henchman meetup<br />

next month at my underground lair in<br />

&#208;&epsilon;&tau;&#114;&ouml;&igrave;&tau;.<br />

Come join us.<br />

Hint: visit http://www.w3schools.com/tags/ref_entities.asp and/or type<br />

in the <strong>HTML</strong> and see what your browser displays.<br />

you are here 115

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!