SlideShare une entreprise Scribd logo
1  sur  4
Lecture 4

Today 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 be
Here is normal text without any font tag.
This is a text with font type Arial and font size 4

Q) 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 font
tag. For example
    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" 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.
This is a text with font type Arial and font size 4

Align the text

        To align the text means whether the text will appear on the left of the page or
right 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 be
My name is Harshit Kumar

I am a student of University of Suwon
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?

Contenu connexe

Tendances

Html heading
Html headingHtml heading
Html heading
saichii27
 
Web topic 5 text formatting
Web topic 5  text formattingWeb topic 5  text formatting
Web topic 5 text formatting
CK Yang
 

Tendances (20)

Html heading
Html headingHtml heading
Html heading
 
HTML
HTMLHTML
HTML
 
Html
HtmlHtml
Html
 
Adding text in html
Adding text in htmlAdding text in html
Adding text in html
 
Web topic 5 text formatting
Web topic 5  text formattingWeb topic 5  text formatting
Web topic 5 text formatting
 
Learn HTML Easier
Learn HTML EasierLearn HTML Easier
Learn HTML Easier
 
Basics of Html
 Basics of Html Basics of Html
Basics of Html
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
CLASS VII COMPUTERS HTML
CLASS VII COMPUTERS HTML CLASS VII COMPUTERS HTML
CLASS VII COMPUTERS HTML
 
HTML basics
HTML basicsHTML basics
HTML basics
 
Html Study Guide
Html Study GuideHtml Study Guide
Html Study Guide
 
Html basics NOTE
Html basics NOTEHtml basics NOTE
Html basics NOTE
 
Html 5
Html 5Html 5
Html 5
 
Beginning html
Beginning  htmlBeginning  html
Beginning html
 
Html basics
Html basicsHtml basics
Html basics
 
Html training slide
Html training slideHtml training slide
Html training slide
 
Html programing
Html programingHtml programing
Html programing
 
Modulo4- Html-Guia
Modulo4- Html-GuiaModulo4- Html-Guia
Modulo4- Html-Guia
 
Html ppt by Fathima faculty Hasanath college for women bangalore
Html ppt by Fathima faculty Hasanath college for women bangaloreHtml ppt by Fathima faculty Hasanath college for women bangalore
Html ppt by Fathima faculty Hasanath college for women bangalore
 
Html
HtmlHtml
Html
 

Similaire à Html basics 3 font align

Html basics 1
Html basics 1Html basics 1
Html basics 1
H K
 

Similaire à Html basics 3 font align (20)

SDP_HTML.pptx
SDP_HTML.pptxSDP_HTML.pptx
SDP_HTML.pptx
 
Html
HtmlHtml
Html
 
Standard html tags
Standard html tagsStandard html tags
Standard html tags
 
html.pdf
html.pdfhtml.pdf
html.pdf
 
TagsL1.pptx
TagsL1.pptxTagsL1.pptx
TagsL1.pptx
 
Html tutorials
Html tutorialsHtml tutorials
Html tutorials
 
Html tutorials
Html tutorialsHtml tutorials
Html tutorials
 
wpsession9.pptx
wpsession9.pptxwpsession9.pptx
wpsession9.pptx
 
Html1
Html1Html1
Html1
 
Basic Html Knowledge for students
Basic Html Knowledge for studentsBasic Html Knowledge for students
Basic Html Knowledge for students
 
Web Design-III IT.ppt
Web Design-III IT.pptWeb Design-III IT.ppt
Web Design-III IT.ppt
 
Week 4 Lecture Part 2
Week 4 Lecture Part 2Week 4 Lecture Part 2
Week 4 Lecture Part 2
 
Html tutorial
Html tutorialHtml tutorial
Html tutorial
 
Basic Html Notes
Basic Html NotesBasic Html Notes
Basic Html Notes
 
Html basics 1
Html basics 1Html basics 1
Html basics 1
 
HTML Tutorial
HTML TutorialHTML Tutorial
HTML Tutorial
 
H T M L Tutorial
H T M L TutorialH T M L Tutorial
H T M L Tutorial
 
htmltag-140317152334-phpapp01.pptx
htmltag-140317152334-phpapp01.pptxhtmltag-140317152334-phpapp01.pptx
htmltag-140317152334-phpapp01.pptx
 
Computer language - HTML tags
Computer language - HTML tagsComputer language - HTML tags
Computer language - HTML tags
 
Coding
CodingCoding
Coding
 

Plus de H K (20)

Assignment4
Assignment4Assignment4
Assignment4
 
Assignment3
Assignment3Assignment3
Assignment3
 
Induction
InductionInduction
Induction
 
Solution3
Solution3Solution3
Solution3
 
Solution2
Solution2Solution2
Solution2
 
Mid-
Mid-Mid-
Mid-
 
Assignment4
Assignment4Assignment4
Assignment4
 
Assignment4
Assignment4Assignment4
Assignment4
 
Dm assignment3
Dm assignment3Dm assignment3
Dm assignment3
 
Proof
ProofProof
Proof
 
Resolution
ResolutionResolution
Resolution
 
Assignment description
Assignment descriptionAssignment description
Assignment description
 
Dm assignment2
Dm assignment2Dm assignment2
Dm assignment2
 
Set
SetSet
Set
 
Dm assignment1
Dm assignment1Dm assignment1
Dm assignment1
 
Logic
LogicLogic
Logic
 
Introduction
IntroductionIntroduction
Introduction
 
Assignment 2 sol
Assignment 2 solAssignment 2 sol
Assignment 2 sol
 
Assignment sw solution
Assignment sw solutionAssignment sw solution
Assignment sw solution
 
Violinphoenix
ViolinphoenixViolinphoenix
Violinphoenix
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

Html basics 3 font align

  • 1. Lecture 4 Today 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 be Here is normal text without any font tag. This is a text with font type Arial and font size 4 Q) 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 font tag. 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 be Here is normal text without any font tag. This is a text with font type Arial and font size 4 Align the text To align the text means whether the text will appear on the left of the page or right 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 be My name is Harshit Kumar I 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 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
  • 4. 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?