We all know that we can write Paragraphs in HTML with many tags , like <p> , <span> etc.
But what the point is if we think about its formatting , for example how to change a text color,how to resize a text .Don't know ? well take a sit ,we will discuss about it briefly , Lets Start ...
First talk about how to resize a font and change it's color also set it's alignment . Please note a point before that in HTML only 3 types of alignments are there : a- left , b-right , c-center
We will go through this line with 'p' tag: "Hello World! Wake up and do your work hard" .
First set it's alignment ,I am showing a example below :
So,we can see the above example where I have put all three alignments with same line .First one will show at the left hand side ,second one will show at the center ,and last one will show at the right side .Now see the output of this example below :
Wow , it shows the correct answer . well we have learned the alignment in very easy way ,that's great ! Now let's see how to resize this text .We have a tag is called 'font' , through which we can resize a text , can change its color . So <font> tag is used to change color ,size of a text .And note a point ,it comes with paired tag .Now let's see an example with same text below :
In the above example,first I have showed normal size of a text , then I have used font tag with attribute 'size' Now let's see it's output below :
Great ! We have learned how to resize a text with HTML font tag , though we can use CSS style instead (will learn it later) .Now let's change it's color with font tag below with an example :
In the above example,we have used a attribute in <font> tag is called 'color' for changing the color of this text .Now see the output below :
That's great !Now let's move with some formatting of a text .
Now,there are some tags in HTML are present to format a text .Like to do bold a text , we can use <b> tag (paired tag) ,for italic type we can use <i> tag(paired tag) etc .
Now I am showing a example in a same page below :
I have shown some of tags to formatting text ,but there are many tags available .It's not possible to show everything though but we will see many more later ."One thing is,we can also use <strong> tag instead of <b> tag . Now let's see output below :
Texts are looking congested but looks good .. :)
So that is it for today . I will recommend, practice again and again .Very easy everything if we practice it .
Please look my Youtube Channel , link is given below :
https://www.youtube.com/channel/UCC_SnAOTQP7uckcZR_3QMcQ
Please follow my Facebook Page link given below :
https://www.facebook.com/Code-Religion-795982750772492/?modal=admin_todo_tour
Keep Learning :)
Thank you .
Comments
Post a Comment