Defining new terms using the DFN Tag
Continuing this cluster of videos we continue and expand on our first definition tag ABBR with the DFN tag. The DFN tag's main goal is to help define a new term that is newly introduced into a document. Most commonly used in scientific articles. The DFN tag will render on the browsers in italics. You may change this default behavior at any time using CSS.
Video Transcript
00:00The next term that we want to look at, and I'm going to create here another paragraph,
00:03I'm going to staple right into it, by the way the formatting, I'm sure we've talked about this before
00:09the formatting doesn't really matter too much. Because HTML ignores spaces,
00:13I could put here a hundred spaces and it doesn't really matter,
00:16or I could break a line in unordered way, you really just want to order it in a way where it's easy for you to work with
00:22In this new paragraph I'm going to copy and put right into it some copy that I prepared in advance
00:28to prepare us for our next definition. I'll read out: In HTML the dfn term is used to help
00:38define or introduce a term for the first time. In other words, it's where you would introduce a new jargon/concept.
00:49I'm going to write ahead, go to my DFN and actually create a dfn tag
00:54which is for 'definition' And as we said its only goal is to introduce for the first time a term that wasn't used before
01:02if it's a scientific article , if it's something that were you introducing new concept and you want people to be familiar with
01:09such as if we're programming school and now we're defining a new term
01:13so we want you to be familiar with that term that we're defining
01:16if we go into the browser and click on refresh, we'll see that definition itself is indented
01:21most browsers will automatically create that italicise.
01:26They would italicise the term, you could control that using CSS which is the topic that we talk briefly about
01:32in our HTML course later on. In our later section of our courses
01:40but the whole point of it is to make sure that it's clear, that this is a new term has been added,
01:44you could have made it bold, you could have made it whatever thing you would want it,
01:47Only thing is: don't use the DFN for indenting things and I'll ask mom...
01:53-why do you think it's not a good idea to use DFN just if I wanted to indent something
01:59-If you wanted to indence, idence or italicise?
02:03-italicise, sorry I always mix them two.
02:05so why wouldn't I want to use the DFN attribute? It's a question for you students as well.
02:09so think about it as my mom thinks about it. Why wouldn't I use it to just for the sake of visual
02:16changing the visuals, what if I wanted to just intdent the word or italicise the word 'introduce'
02:23would I use the dfn or would I use the 'i' tag that we learnt on the previous video?
02:29- You would use the 'i' tag,
02:30-and why would I use the 'i' and not the dfn ?
02:33-you need some sort of other...?
02:36-well the reason is very simple. The DFN has meaning. The DFN means it's a definition,
02:41I would never use it unless I'm using it to define something. Now it's really important because
02:47it's a cementic value which search engines and the things that happen in the background of your application
02:53if you don't use the terms correctly, search engines and other sources of data aggregators
03:00wouldn't be able to read your information correctly. While if you said it as DFN then the browser
03:06and any other thing that needs to know would know that it's a definition of a new term,
03:10If you'd use an italic or you would use a dfn in a place where it shouldn't be,
03:15you'd just add a confusion and you'd add up process that could damage your reputation as a website as well
03:21over long term, alright? So it's really about using the tags correctly for their meaning.
03:27Although the dfn will italicise your data it's not its goal. Its goal is to mark and say :
03:36'this is a new definition' I would never use it just for the sake of italicising something.
03:44Let's move onto the next thing
