Join Sue Jenkins for an in-depth discussion in this video Coding special characters dependably with entities, part of Productivity Tips for Web Designers.
- Hello friends, I'm Sue Jenkins, and welcome to productivity tips for web designers. In this week's installment, I'll show you how to use code entities correctly in your HTML markup. In addition to these special characters, there are entities for things like arrows, mathematical symbols, shapes, and Greek characters. Each entity begins with the ampersand symbol, contains a specific series of letters and numbers, and ends with a semicolon.
For example, the entity for the letter N with a tilde on top, which makes the sound enye, is ampersand ntilde semicolon. And the entity for the copyright symbol is ampersand copy semicolon. Using entities in place of unicode characters is a really wise thing to do as a web designer because it eliminates the possibility of having the browser arbitrarily replace your desired character with something else, like this.
If you're familiar with looking at HTML code, you may already know one entity by heart. That's ampersand nbsp semicolon. The non-breaking space. You'll often see them in your code when you insert an empty paragraph, which might look like this. Some entities actually use names, while others use numbers or a combination of letters and numbers. Most entities with names will also have a numbered equivalent, such as the ampersand, which can be represented with ampersand amp semicolon, as well as ampersand hashtag 3 8 semicolon.
While most browsers today will support both types, the numerical version will likely be the more reliable one across a wider array of devices. Adding an entity to your HTML is as easy as copy, pasting from a website, or inserting it through your web editing software. For instance, to add an entity in Dreamweaver, place your cursor where you'd like to insert the entity. So I might wanna replace this with a copyright symbol.
Then select Insert, HTML, Special Characters. The most commonly used entities are listed here or if you don't see what you're looking for in this list, you can click on Other. I see Copyright, so I'll click that. Now if we look at our code, we should see it there. Ampersand copy semicolon. Since there are just over 250 HTML entities, there is no reason for you to memorize them unless you enjoy that kind of challenge.
Instead, I'd recommend that you head over to two websites. First is the w3schools.com website. They have a complete list of all the HTML entities in a big long list along with symbols, arrows, dingbats, and more. Or better yet, for a more visually pleasing display of these HTML character references, visit the html5 character reference page, on the w3.org website. Entities are great for all kinds of symbols like ellipsis, em and en dashes, letters with accents, degree symbols, copyrights, trademarks, even quote marks.
Keep your eyes open for opportunities to make your code right, by adding entities to your HTML markup.
Skill Level Appropriate for all
Q: In "Organic and ethical SEO coding," the author mentions Google+ Authorship. I heard Authorship results are no longer shown in Google search results. Why? Are there benefits to keeping the Google+ Authorship markup on my site?
A: As of September 2014, Google discontinued Google+ Authorship for SEO. The only reason to keep the code on your site would be for Author Rank purposes. See http://searchengineland.com/google-authorship-dead-author-rank-202254 for more information.