FREELessons: 32Length: 5 hours

Next lesson playing in 5 seconds

  • Overview
  • Transcript

2.6 Blockquotes

[SOUND] Sometimes we need to quote somebody. Whether it's a book passage, or something somebody said on a different blog. There's a lot of different uses. Think of it just when writing a normal article with pen and paper. There are some times when you need to quote somebody, and we can do that within HTML as well, by using what's known as the blockquote element. Now, within here, this is a way to tell the processor anything within here is a quote. So, why don't we reference an Einstein quote. I've pulled up a list of some of his quotes, lets get one of these. So, within here, it is a paragraph, so I'm gonna make sure, that I add a p tag, paste it in, and close out my paragraph as well, and remember what we learned about indentation. It's good practice to make sure we indent, so it's easy to tell that this paragraph is a child of the blockquote. Good, so lets save that and view it in the browser. So if I view it, it may not look at anything special to you, and that's okay because remember, if you are expecting maybe big shiny quotation marks, or at least the text to be italic, that's not what markup is about. Markup does not specify formatting, or font weight, or font style. It's simply to describe your content, and that's something you always need to remember. So you might be thinking, well, why would I ever use that? It's just as easy to do this. I get the same effect, and it's less markup. And it's because we are describing our content. And that is equally important, whether it be for screenwriters, or for future proofing our markup. So, let's save that. And if I view the source, once again, you can go to View> Developer> Source, or I always press Ctrl, Cmd+U on the mac. And now, we have given the browser some understanding as to what this specific content is. So just remember, if you're writing a blog posting, if you're doing a website, any time you need to provide a callout. And its again a nice way when creating blog postings, to divide your content. Once again, if we refer to Nettuts, you can see that we use blockquotes like so, let's check it out, Inspect Element. And, once again, you can see that it is wrapped within a blockquote, and within here, we have our quote. And then we're using styling or cascading style sheets, to make the text italic, to add a quotation mark here, to make it look like a quote. But the markup alone, is simply a blockquote, with a paragraph tag in it.

Back to the top