Your SlideShare is downloading. ×
Html basics 3 font align
Html basics 3 font align
Html basics 3 font align
Html basics 3 font align
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Html basics 3 font align

2,314

Published on

Published in: Technology, Design
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,314
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Lecture 4Today we will learn • Using the Font tag • Align the text Font means a specific size 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 beHere is normal text without any font tag.This is a text with font type Arial and font size 4Q) Try the above code with font Batang, and print the output?You can also specify the color with the font tag. i.e. color is another attribute of the fonttag. For example Type the following code in notepad and save the file as .html. <html> <head> <title> Using the Font tag </title>
  • 2. </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 beHere is normal text without any font tag.This is a text with font type Arial and font size 4Align the text To align the text means whether the text will appear on the left of the page orright of the page or center of the page.Type the following code in notepad and save as .html file.<html> <head> <title> Using the Align tag </title> </head> <body> My name is Harshit Kumar <p>I am a student of University of Suwon</p> </body></html>The output will beMy name is Harshit KumarI am a student of University of Suwon
  • 3. If there was no <p> tag, then two statements “My name is Harshit Kumar” and “I am astudent 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 thesame 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 meansparagraph tag, and <p> tag indicates the browser to start a new paragraph.Now let us come back to aligning the textType 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 isMy name is Harshit Kumar I am a student of University of Suwon
  • 4. So, You can see that the second statement is aligned towards the right. Similarly the alignattribute 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”>? Showwhat the output is?

×