Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
In this lesson we are going to fix quotation marks and apostrophes in our web site so they are true quotation marks and apostrophes. You need the file biblio_serif_quote. html and biblio_serif_quote.css from the exercise folder. You also need the fonts folder with the Chopin Script web font files in it. So drag your fonts folder from your desktop, make a copy of it, and put it in your exercise folder. That way Chopin Script will continue to load properly.
If you don't have a fonts folder and need a refresher on how to download and organize web fonts from Font Squirrel, see Chapter 1, Lesson 7, Downloading Web Fonts, from earlier in this course. Let's open our HTML file in the browser and see what we are working with. If we scroll down a bit-- I am going to also go in a bit. Scroll down. you can see that I've already changed some of the quotation marks. So they are using what we call curly quotes.
It's a punctuation mark that's been designed as part of a font. So it gracefully relates to the other characters around in. If we scroll up I'll show you some that have not been changed yet. Here the quotation mark is defaulting to the double prime. These quotation marks aren't real. They are the prime and double prime marks. They mean feet and inches. That is, little vertical hashes that stick out and they can interrupt to the flow of the text.
The problem is if you just type in a double or single quotation mark these are the default. You get the double prime and the prime marks because that's how the browsers read them. So how do we fix these? We use something called character entities. Character entities are snippets of code which help the HTML show characters that won't otherwise work. Let's open our HTML document. If I scroll down to the section Thinking with Type by Ellen Lupton, you can see that the word "rules" here is in quotation marks.
But they are no longer those quotation marks that we've typed in. I've used the character entities here. What we are going to do is we are going to copy this first one. This one means a doubled left quotation mark. I've selected it, I am copying it and we can go up to our top section, these first three references or resources, and we can just paste it wherever we see a left double quotation mark. This first one has quite a few of them because there are quite a few quotes in it.
And to the second one, the word fonts, you may have noticed and there's a final quote here in the third one. Excellent! We are going to scroll back down and find the closing quotation mark there, highlight it, copy it. We are going to go back up and paste it here after the word Bible, after the word conditions. The word subject.
After the word family and then the end here after mathematically. After the word fonts under Nice Web Type and at the end here. This seems tedious. I wanted you to do these by hand. This is how we do it. And then the variant here after the word you under Good Web Fonts, pasted that in as well. Let's save this and review it in our browser. Excellent! You can see now that we're getting these double quotation marks.
Now go ahead and zoom in even a little more for those of you working in a smaller monitor. You can see that these are curly quotes. That's great. Now we are going to look at-- I believe we have a couple of-- we do. We have an apostrophe here. An apostrophe is just a single right quotation mark. So we have to go in and fix that back in our HTML. If we scroll all the way down to I Love Typography, here is the word It's and there is the character entity. It's 8217 there.
Make sure you get the whole thing, the ampersand and the semicolon. I've selected it. I am going to copy it. Go all the way up back up at the top and there is The Typographer's Bible. I am going to paste that there. I am going to double check and see if there is any in the others. You see the word "you'll" here in Nice Web Type and the word "We're" under Good Web Fonts. So I am pasting these in.
I think I've got them all. I copy and paste as usual whenever I can especially with character entities because there are a string of numbers that don't necessarily make sense and this way I don't accidentally type in the wrong character. Let's save this and review it in our browser and excellent. We can see now that the punctuation is really good. We've got our quotation marks and our apostrophes. So there are a lot of typographic symbols that use entities, not just quotation marks.
To view a chart of them, which is helpful, I actually recommend w3schools.com. You can get these from a lot of different sites but I really like the way that they've laid this out because you can see the character that you're trying to replace here on the left. You can see you have access to the entity number, the entity name, and the description of what the character is. If we scroll down a little bit you can see that here is our quotation marks that we've been working with. This is what we've been trying to create and we've been using these numbers.
I always recommend using the numbers. They are supported by most browsers. I also wanted to just point out to you quickly that you will notice that all of them start with the ampersand and end with a semicolon and that's also true if you are using the entity name. This tells the browser that this is a character entity, that it's not just a string of characters. That's why those characters don't just pop up in your HTML text. If you want to learn more about the proper use of punctuation on the web, I recommend the trouble with EM 'n EN and Other Shady Characters.
It's an article by Peter Sheerin on alistapart.com. So take the time to make sure you're using the correct punctuation marks. They are meaningful and beautiful. You've work hard to create your typographic layout. Don't let the prime and double prime marks bring it down.
Get unlimited access to all courses for just $25/month.Become a member
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Your file was successfully uploaded.