02Geek HTML5 and JavaScript, TypeScript, React, Flash, ActionScript online School
Previous VideoNext Video

Learning HTML Quoting Tags: q, cite and blockquote

There are many times in a web sites life that you would want to quote someone and in this group of tags we will learn the best ways to do just that.

Video Transcript

00:00Welcome back, I'm actually going to send an email out today to my users
00:05so we have a newsletter where we kind of like drafting: this is the start of newsletter
00:09and I really want to create a marketing buzzy kind of thing and quote one of our students
00:15I want to do this for the next couple of weeks, starting off all of our emails with something
00:19one of our student said to us. This week one of our student sent me an email telling me:
00:24I love the course, it helped my company a lot
00:27I love that and I think that's really great way to let people know that our course makes a lot of money
00:33to people and we're getting a lot of thankful emails from students that tell us that
00:39they're making a lot more money today than they did before,
00:41Because they took our adWords course, kind of awesome,
00:45So we want to share that in our newsletter so want to make sure that we're sending this information to users
00:51Obviously if I send it this way it sounds like I love the course, it helped my company a lot
00:57well, it's true that I love the course as well, it helped my company a lot because I've made money off of it
01:02but I'm not saying it, It's someone else is saying it, and that's where we introduce quoting,
01:07and how do you define quoting in HTML, obviously you could put a double quote around something
01:13nothing wrong with that. In our case because we're going to be sending an email,
01:18you're not allowed really use CSS in emails, it's a known rule in HTML that you want to minimize
01:24the amount of CSS that you use when you're sending emails
01:27because a lot of email browsers just have really old engines and they don't really support CSS
01:32or they have a very limited capacity of that support.
01:36First of all, we want to quote this: I love the course. It helped my company a lot.
01:41let's first go right into our HTML and find that copy.
01:46Don't worry there's a lot of stuff here that we didn't learn and deliberately I'm kind of introducing you to stuff
01:51that we'll cover in future videos if you continue learning with us.
01:54But I want to search through the place we have: I love the course, which is an H1 tag
01:59which you know what that is. Inside of here I want to create a quote.
02:04I'm going to wrap it around a 'q' tag telling the browser : This is a quote
02:10If we could have done CSS, we could also define how would we want it to look like
02:15even by adding quotes around it.
02:17But the quote itself is literally to tell the browser and every browser will render it differently
02:22it's just to tell the browser that: this is a quote, it's not an original subpost that we're writing
02:27but this is something that came frome someone else, and you could se by default it's adding a quote around it
02:32which is very helpful. 'I love the course. it helped my company a lot' I personally think it would look way better
02:38if we broke a line. As we said we can't do CSS but what we could do is go inside and just add a break line
02:44right after 'I love the course' because it's such a powerful beginning.
02:51By the way, that course, probably we could modify it just for the sake of our users that's watching,
02:56'I love the AdWords course'
03:02because it implies that, it makes it easier for people to know what that is,
03:06I'll make sure that I get approval from the student to add that extra word in site
03:11Going back into our browser, we click on refresh and we'll see 'I love the AdWords course(...)'
03:18Very strong message, it basically says, you know:
03:21If you want your company to succeed more, you probably want to take AdWords course as well,
03:25Awesome. This is a great title. We saw how to use it, we have two more things we want to look at,
03:31the next one is cite, one of the stuff that I'm going to do in my newsletter is
03:35when we go into sending the email then I'll probably start the paragraph which I didn't even write yet
03:40I'll just start: That's what one hundreds of ours students has said to us this week'
03:53so basically one of our students is not exactly a citation but I'm not going to put a name,
03:59because I didn't get his approval yet. We want to make sure that we connect within that quote whoever said it
04:06What we could do is to put a dash and we'll write here: cite and we close the cite
04:14and in the cite itself we basically say who said it, so for now let's just write Ben - because that's my name
04:20but it actually it's someone else's that has a real name, just don't have the approval
04:24So maybe we could type here student, less direct and if we go into our application, again this is more of
04:32an indication for the browser itself and it tells the browser that it's a student.
04:37I want us to get some sort of a indentation at obviously this is something that you guys could change
04:43if you knew CSS. In this case, because we're sending an email it wouldn't help that much
04:50That's it for quote and citing, enables us to quote a paragraph and to cite
04:54saying who said that quote. Last but not least is blockquote,
04:59now you use blockquote whenever your code is longer than a line, in this case this is a block
05:06because it's more than a line so in this case the 'q' wouldn't be the right option,
05:10we probably would want to write a blockquote, if we go inside of our application again,
05:14we could then write 'blockquote' and close it with a blockquote right here,
05:28and the whenever we would want to use a citation inside of the tag we could add another one,
05:34which I don't have a specific one in my mind right now.
05:39Maybe here: Another student said wow!
05:46alright, maybe you say wow and I'll be able to add it as a quote and we would just wrap it around with the 'q'
05:53wow; close that with the q, save it and then we see that we have a blockquote, we have a citation and the 'q'
06:04if we do little refresh, we'll see our quotation. First of all, we where we have a blockquote -
06:10our double quotations disappeared but what happens instead, it gets indented inside as a block
06:16you could then add in your own double quotations around it or not
06:21and in the other hand when it's in line, you'll see that we have a quotation around it,
06:25the idea behind it is if you had a text right here and it's written right underneath the source
06:30that it's kind of intuitive that it's form an external source and it's not what we're saying
06:35we just learnt 3 new HTML attributes: Q, cite and blockquote

Ready to Level Up Your Skills?

Join thousands of learners on 02GEEK and start your journey to becoming a coding expert today!

Enroll Now for Free!