Discovering Self Contained Tags: BR Tag
Video Transcript
00:01In this video we're going to be talking about the first new thing that we're learning this week
00:07We want to talk about tags that don't have any content
00:13What are tags that don't have any content?
00:16There are tags that enable us to break a line,
00:20if you want to break a line, which is the BR tag,
00:22for example, we want to break a line here,
00:25If you've noticed in our H2 we have you all stuff and we want to break the line physically,
00:30but if we go into our browser and click on refresh,
00:33we'll see that 'or FREE' is not in a broken line
00:38But we really want to break a line just as we have it in our blog
00:42that I created for this promotion that we're doing in March
00:46that we're giving away one of our courses.
00:48You're invited to check it out if it's still March
00:51or just go onto our blog, we always have something going on
00:54which is exciting and we have always a nice little dirty animated crtoon to catch people's eyes.
01:01Back to what we're talking about,
01:03we want to break a line, so let's break a line
01:06the basic tag of breaking a line is just 'BR'
01:10and that would break a line, now we have a problem though,
01:13because BR broke a line, and we'll see that everything is fine,
01:17we will see that the line broke,
01:19because we created a new br tag, which is break line,
01:21or break basically,
01:24We said that every tag that opens has to close,
01:27and in this case, we didn't do another 'close br'
01:31and it's not even legal to do that, because there's no such thing,
01:35a break line can't have content,
01:37it's not something that has content,
01:39the way we tell the browser about tags that don't have content
01:45is by putting a space right after the tag br
01:48and then putting a slash,
01:50just the same slash that we put for closing tags
01:53what we basically did here is we told the browser:
01:55this is the break line and it's self contained it can't have anymore children
02:00No nesting could happen inside of this,
02:02contrary to our body that we know we could nest it,
02:06and h1 we could nest it, and so on and so forth
02:08You would obviously never do that to a body or h1 or p
02:12because those would always contain something
