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

Using the I Tag

We are going to learn now about the I tag. The i tag enables you to italicize elements in your HTML5 documents. In this video we learn about this tag but talk more about the importance of keeping the HTML rules of opening and closing tags in the right point in the document.

Video Transcript

00:00Let's continue, we're going to learn now about the 'i' tag
00:03which basically will let us italicize I believe,
00:08Let' do that, it's very simple, obviously
00:10now when you're used to things,
00:15let's just pick something randomly,
00:17"Ever have a dream that you were XML hero"
00:20Let's just make that italic, or italicized,
00:26We're going to save that, again - open/close
00:28make sure that we always open/always close
00:30and we're keeping the rules of nesting
00:34so we nested our 'i' inside of the 'p' tag
00:37but we're not mixing them all together,
00:39If we wanted to bold something, let's say we want to bold XML hero,
00:43what if we want to bold all of this,
00:45if we're already talking about that?
00:47How would we bold all of this? Ma' let me just ask you that question,
00:50-can I just go here and bold this and bold until here ?
00:53-is that legal ?
00:56-One minute, let me see... you opened and you closed, yeah
01:02Well the problem is I opened my 'i' and closed it right here,
01:06so I'm basically breaking the rules because I'm opening my B tag and closing it outside of its space
01:12If I open the B tag here - I have to close it within that 'i' space
01:15because we want to keep the laws of nesting
01:18So this is illegal, how could we fix this?
01:21do you have any inclination?
01:26-Put it in front of italicize,
01:28-but if we want to bold this as well? We would just open up and bold
01:32so we would close our bold right here and we would just open up a new bold right after italicize
01:39and now we have completely legal bolding, completely legal nesting,
01:42because our B is completely nested inside of the 'i'
01:45and this 'b' inside of , what is it nested ?
01:48-making your life a little bit hard right now,
01:51-In italicize -well no, this 'b' was inside of the italicize,
01:56so this is all the italicize part,
02:01and the next question is, what the 'b' that's outside, it's nested into what tag?
02:09-in the paragraph -bingo
02:11So you're getting it, that's exactly it.
02:14I hope you guys are getting it as well,
02:16we just learnt about italicize
02:18if we save and go into our application, we click on refresh,
02:22We'll find our italicized copy , where some of the bolded copy is italicized,
02:27and some is not, because it's not :)
02:29Alright, so that covers our italicize
02:31and in our next video we're going to continue and explore a couple of the other ways
02:36to visually enhance our page

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!