How can you provide an extra feature to any tag?

If this is a tag you can say this attribute here this is an attribute because this is an extra feature provided to this particular tag right this is an extra feature if you look at this huge this is also an extra feature right okay let me show you one more thing somebody asked me how to increase the font size or font of the text right let’s do that if this is a paragraph and I have to write here style then I have to mention here color this is for text color so if I’m putting text color as let’s say red if I save this file you can see in the paragraph I am changing the color to red so when I go to my web page and I reload can you see this particular thing this paragraph is becoming red.

What if I write here background color as black what will happen when I do that so when I reload my page the paragraph background color is black I hope you can see that I’ll again show you how do we how I have written it style color equal to red color means the text color it will become red and the background color for that will become black now you will ask me, sir, what if I do this in the body let’s do it so if I write here style then same thing equal to background color let’s say if I’m giving here purple [Music] right if I’m giving now the body is the whole web page remember the whole content so if I go there and if I reload my page the whole page is becoming purple right and these links are blue you can’t see even I can’t see because color combinations are bad okay so never use such a bright color always use some colors which you know is very light in color and is having a faded quality something like that you can use let’s say line say.

If I write lime here this will this color will become line right I know these colors are very bright so don’t use it any time in your particular web page okay why I have not closed beard hr tag now look here guys so if you talk about this paragraph when you talk about this paragraph this paragraph is having some content right which is written in the white part it’s written in the white part right this is a paragraph when you talk about anchor tag this is also having a content which is in white part but when you talk about Br or hr is it having any content do we need to write any content for it because a single tag of Br will do the work it will provide a space a single tag of hr will provide its horizontal line so basically in this kind of tags we don’t have to write any content right we don’t have to write any content for these these tags are called as empty tags okay so I’ll just write it here Br and hr tags are empty tags because they do not have any content they do not have any content that is why these are called as empty tags there are so many more tags such like that which is you know IMG then which is for image right there are so many tags like this.

Now let’s move to another HTML document and let me explain to you what are div and span okay let’s quickly move to the slides and you can see here elements I’ve already told you so elements are nothing but the names okay which I have explained here if you can see elements are the names also elements is also having one more meaning if you look at this particular whole thing right this whole sentence the whole sentence is one element what is containing in this that whole sentence the tag name the style the attributes the tags everything is there in that particular line that is also an element I’ll comment this whole portion you have to select everything control slash it’s all commented okay one second I missed out this portion, okay everything is commented now let’s move to the session two.html.

Let’s move to the slide written some things about elements we have already seen the whole thing you can see p color red this is our first paragraph this whole thing is also element right start to take and tag attribute I’ve already told you these things div tags are block-level elements paragraphs div these all are block-level elements so what is block-level let’s say if I’m putting a div here and if I’m writing style and I’m giving a color here let’s say I’m giving the background color as red and here I’m going to write this is div 1 okay going to close the div I’m going to create one more div and I’m going to write here div style background color I’ll be writing here yellow and this is div two and now I’ll be writing one paragraph and this particular paragraph also I’ll be giving one style I’ll be putting one color.

Let’s say background color um black let’s say black and I’ll be writing this is the paragraph okay when I do that what happens when I save the file and if I copy file path and I go to my browser have a look what happens so let me zoom it okay the black color paragraph is not coming because the text color is also black so let me change the color of the text I’m writing color red, so the text color is changed to read now if you can see here can you see DIVS both the DIVS are very close to each other but when you talk about the paragraph it is containing this whole thing [Music] so DIVS are the containers this is one container this is two containers second one and when you talk about paragraph this paragraph is taking this white part also okay, so paragraphs take an extra space, but this doesn’t take an extra space okay that is why this kind of things are called as block-level element see this is the whole block.

I didn’t tell it to take the whole web page I just said that this much it should take but it’s telling the whole taking the whole block that is why it is called as block level so paragraph div tag these all are block level one full block will be taken h1 h6 OUL these all things will take the whole block okay let’s see what is inline level block level we have seen that it will take the whole block let’s see what is in line level in inline level we will talk about span and on so this inline level will not take the whole thing the whole block it will just take the uh how much how much ever space you want to take it let’s take an example that will be better to explain so if I write a paragraph here let’s say I’m not giving any styles let’s right here that my eye color is blue okay or I can write mom is having blue color eyes okay something like this I have written some random paragraph now if you can see here when I reload the page and I see you can see what is happening the same thing is coming my mom is having a blue colored eyes right if what i what i will do here in this blue I only want this blue should be coming in blue color.

See what we are doing when I want a text color to be colored I was putting style in the first tag itself but I don’t want the whole thing to be blue color I want only this one text to be blue color so I’ll be writing here span in this I will put this style and I’ll put here color okay let’s take equal to and color I’ll put here blue once you write like this what will happen okay uh so I have to put the double quote here not there okay and then I’ll close this span here only because I want only this much to be blue right so I’ll be closing it here once

Leave a comment