This Is A Text With Font Type Arial and Font Size 4
This Is A Text With Font Type Arial and Font Size 4
This Is A Text With Font Type Arial and Font Size 4
ze and style of the text. Size means the width of the text, and style means whether the text is Arial, Times New Roman, etc. Type the following code in notepad and save the file as .html. <html> <head> <title> Using the Font tag </title> </head> <body> Here is normal text without any font tag. <br> <html> <head> <title> Using the Font tag </title> </head> <body> Here is normal text without any font tag. <br> <font face="arial" size="4"> This is a text with font type Arial and font size 4</font> </body> </html> </body> </html> The output will be Here is normal text without any font tag.
</title> </head> <body> Here is normal text without any font tag. <br> <html> <head> <title> Using the Font tag </title> </head> <body> Here is normal text without any font tag. <br> <font face="arial" size="4" color=blue> This is a text with font type Arial and font size 4</font> </body> </html> </body> </html> The output will be Here is normal text without any font tag.
If there was no <p> tag, then two statements My name is Harshit Kumar and I am a student of University of Suwon would come one after the other on the same line. Whereas <p> tag inserted a new line between the two statements, doing some what the same as <br> tag. If you notice the output very carefully there is some difference between <p> tag and <br> tag. Q) What is the difference between the <p> tag and <br> tag? A) The difference is <p> tag inserts a double new line between two statements whereas <br> tag inserts single new line between two statements. Actually <p> tag means paragraph tag, and <p> tag indicates the browser to start a new paragraph. Now let us come back to aligning the text Type the following code and save as .html file. <html> <head> <title> Using the Align tag </title> </head> <body> My name is Harshit Kumar <p align="right">I am a student of University of Suwon</p> </body> </html> The output is My name is Harshit Kumar I am a student of University of Suwon
So, You can see that the second statement is aligned towards the right. Similarly the align attribute of <p> tag can be used as left or center. Q) Try the above code with <p align=left> and also with <p align=center>? Show what the output is?