SlideShare a Scribd company logo
1 of 4
Lecture 2
What we will Learn
  • Heading tag: <h1>, <h2>, <h3>, <h4>, <h5>, <h6>
  • <br> tag
  • Comment Tag: <!-- -- >


In the last lecture, we learned that the first tag on the web page we made is the HTML tag
which tells the browser that the document is HTML;

<html>

The last tag on the page is the end HTML tag, which tells the browser that the HTML bit
has finished;

</html>

Did you notice the '/' bit which tells the browser that this is the end tag, not the start?

Heading
Today we will learn about heading tag, which looks like <h1> or <h2> or <h3> or <h4>
or <h5> or <h6>.
Let us take an example to understand this tag.

<html>
<head>
<title >My Home Page with a heading</title>
</head>
<body>
<h1>My Heading</h1>
You write things here...
</body>
</html>

Write the code above and save as an .html file.
And the output looks something like this
My Heading
You write things here….


Take another example
<html>
<head>
<title >My Home Page with a heading</title>
</head>
<body>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
<p>This is normal text!</p>
</body>
</html>

And the output is now,


Heading 1
Heading 2
Heading 3

Heading 4

Heading 5

Heading 6


This is normal text!

So, that was different ways of representing text.

Let us study about <br> tag. Please write the code below and save as an .html file
<html>
<head>
<title >My Home Page with a heading</title>
</head>
<body>
   My name is Harshit.
   I am studying at University of Suwon       .
</body>
</html>

The output will be
       My name is Harshit I am studying at University of Suwon

Q) Can any one tell me what is the problem with the above output?
A) When I wrote the code, I made two lines, one line contains my name and the other line
contains the name of University. But the output shows two lines one after the other.
So that means, HTML does not interpret the <return> key.
The solution to the above problem is <br> take. <br> tag is also called as blank rule. It
inserts a line.
<html>
<head>
<title >My Home Page with a heading</title>
</head>
<body>
   My name is Harshit. <br>
   I am studying at University of Suwon     .
</body>
</html>

 Now the output will be

My name is Harshit.
I am studying at University of Suwon.


Q What is the output for the code below?
<html>
<head>
<title >My Home Page with a heading</title>
</head>
<body>
   My name is Harshit. <br> I am studying at University of Suwon.
</body>
</html>

Answer)


Comments
Q) Why do we need comments?, infact every language supports comments, be it C,
C++ or Java?
Answer) When we write a page with a lot of code, and we come back to it later to wonder
what we did, it can be made easier if we have comments in the document which don't
show up in the browser.

For example


<html>
<head>
<!-- This is the title of my page
<title>My Page</title>
</head>
<body>
<!--This is the start of my page! As if I didn't know
that - I did say it was a trivial example!-->


<!--Start of my heading-->
<h1>My Heading - What my page is about.</h1>
<!--End of my heading-->

</body>

So the output is


My Heading - What my page is about.
Everthing contained in <!-- -- > is not visible on the browser.

More Related Content

What's hot

HTML_Slideshow1
HTML_Slideshow1HTML_Slideshow1
HTML_Slideshow1ldehn
 
3. tutorial html web desain
3. tutorial html web desain3. tutorial html web desain
3. tutorial html web desainfaizibra
 
Html basics 3 font align
Html basics 3 font alignHtml basics 3 font align
Html basics 3 font alignH K
 
Best HTML Training &Coaching in Ambala
Best HTML Training &Coaching in AmbalaBest HTML Training &Coaching in Ambala
Best HTML Training &Coaching in Ambalajatin batra
 
Introducing HTML
Introducing HTMLIntroducing HTML
Introducing HTMLritaester
 
215077679 introduction to HTML
215077679  introduction to HTML215077679  introduction to HTML
215077679 introduction to HTMLXolani Madlopha
 
Very basic intro to HTML
Very basic intro to HTMLVery basic intro to HTML
Very basic intro to HTMLkmcintyre3
 
How to create basic webpage
How to create basic webpageHow to create basic webpage
How to create basic webpageJames Erro
 
Creating your first web page
Creating your first web pageCreating your first web page
Creating your first web pagecachs_computing
 
Html introduction by ikram niaz
Html introduction by ikram niazHtml introduction by ikram niaz
Html introduction by ikram niazikram niaz
 
Introduction to Html
Introduction to HtmlIntroduction to Html
Introduction to HtmlJoni
 

What's hot (20)

Html.ppt
Html.pptHtml.ppt
Html.ppt
 
HTML_Slideshow1
HTML_Slideshow1HTML_Slideshow1
HTML_Slideshow1
 
Html
HtmlHtml
Html
 
3. tutorial html web desain
3. tutorial html web desain3. tutorial html web desain
3. tutorial html web desain
 
Html basics 3 font align
Html basics 3 font alignHtml basics 3 font align
Html basics 3 font align
 
Html
HtmlHtml
Html
 
Html
HtmlHtml
Html
 
Html and its tags
Html and its tagsHtml and its tags
Html and its tags
 
Best HTML Training &Coaching in Ambala
Best HTML Training &Coaching in AmbalaBest HTML Training &Coaching in Ambala
Best HTML Training &Coaching in Ambala
 
Introducing HTML
Introducing HTMLIntroducing HTML
Introducing HTML
 
215077679 introduction to HTML
215077679  introduction to HTML215077679  introduction to HTML
215077679 introduction to HTML
 
Very basic intro to HTML
Very basic intro to HTMLVery basic intro to HTML
Very basic intro to HTML
 
How to create basic webpage
How to create basic webpageHow to create basic webpage
How to create basic webpage
 
Creating your first web page
Creating your first web pageCreating your first web page
Creating your first web page
 
1. html introduction
1. html introduction1. html introduction
1. html introduction
 
Html For Bloggers
Html For BloggersHtml For Bloggers
Html For Bloggers
 
Html introduction by ikram niaz
Html introduction by ikram niazHtml introduction by ikram niaz
Html introduction by ikram niaz
 
HTML Lesson 1
HTML Lesson 1HTML Lesson 1
HTML Lesson 1
 
Html coding
Html codingHtml coding
Html coding
 
Introduction to Html
Introduction to HtmlIntroduction to Html
Introduction to Html
 

Similar to Html basics 1

SDP_HTML.pptx
SDP_HTML.pptxSDP_HTML.pptx
SDP_HTML.pptxVani011
 
basic knowledge of html which is related to frontend web development.
basic knowledge of html which is related to frontend web development.basic knowledge of html which is related to frontend web development.
basic knowledge of html which is related to frontend web development.utsavsingh265
 
Web Design-III IT.ppt
Web Design-III IT.pptWeb Design-III IT.ppt
Web Design-III IT.pptbanu236831
 
02 HTML-01.pdf
02 HTML-01.pdf02 HTML-01.pdf
02 HTML-01.pdfEshaYasir1
 
Hyper text markup Language
Hyper text markup LanguageHyper text markup Language
Hyper text markup LanguageNaveeth Babu
 
Html basics-auro skills
Html basics-auro skillsHtml basics-auro skills
Html basics-auro skillsBoneyGawande
 
Lesson 2: Getting To Know HTML
Lesson 2: Getting To Know HTMLLesson 2: Getting To Know HTML
Lesson 2: Getting To Know HTMLOlivia Moran
 
W6 - Intro to HTML.pdf
W6 - Intro to HTML.pdfW6 - Intro to HTML.pdf
W6 - Intro to HTML.pdfTekobashiCarlo
 
Lesson plan: HTML Formatting Texts and Paragraphs
Lesson plan: HTML Formatting Texts and ParagraphsLesson plan: HTML Formatting Texts and Paragraphs
Lesson plan: HTML Formatting Texts and ParagraphsKeith Borgonia Manatad
 
Html tutorial
Html tutorialHtml tutorial
Html tutorialShankar D
 
Basic Html Knowledge for students
Basic Html Knowledge for studentsBasic Html Knowledge for students
Basic Html Knowledge for studentsvethics
 
HTML (Basic to Advance)
HTML (Basic to Advance)HTML (Basic to Advance)
HTML (Basic to Advance)Coder Tech
 

Similar to Html basics 1 (20)

SDP_HTML.pptx
SDP_HTML.pptxSDP_HTML.pptx
SDP_HTML.pptx
 
basic knowledge of html which is related to frontend web development.
basic knowledge of html which is related to frontend web development.basic knowledge of html which is related to frontend web development.
basic knowledge of html which is related to frontend web development.
 
TagsL1.pptx
TagsL1.pptxTagsL1.pptx
TagsL1.pptx
 
Lesson plan htmltextformattingtag
Lesson plan htmltextformattingtagLesson plan htmltextformattingtag
Lesson plan htmltextformattingtag
 
Web Design-III IT.ppt
Web Design-III IT.pptWeb Design-III IT.ppt
Web Design-III IT.ppt
 
HTML Tutorial
HTML TutorialHTML Tutorial
HTML Tutorial
 
02 HTML-01.pdf
02 HTML-01.pdf02 HTML-01.pdf
02 HTML-01.pdf
 
Hyper text markup Language
Hyper text markup LanguageHyper text markup Language
Hyper text markup Language
 
IT Unit III.pptx
IT Unit III.pptxIT Unit III.pptx
IT Unit III.pptx
 
Html basics-auro skills
Html basics-auro skillsHtml basics-auro skills
Html basics-auro skills
 
html.pdf
html.pdfhtml.pdf
html.pdf
 
Lesson 2: Getting To Know HTML
Lesson 2: Getting To Know HTMLLesson 2: Getting To Know HTML
Lesson 2: Getting To Know HTML
 
W6 - Intro to HTML.pdf
W6 - Intro to HTML.pdfW6 - Intro to HTML.pdf
W6 - Intro to HTML.pdf
 
Lesson plan: HTML Formatting Texts and Paragraphs
Lesson plan: HTML Formatting Texts and ParagraphsLesson plan: HTML Formatting Texts and Paragraphs
Lesson plan: HTML Formatting Texts and Paragraphs
 
Html tutorial
Html tutorialHtml tutorial
Html tutorial
 
Basic Html Knowledge for students
Basic Html Knowledge for studentsBasic Html Knowledge for students
Basic Html Knowledge for students
 
HTML
HTMLHTML
HTML
 
Advance HTML
Advance HTMLAdvance HTML
Advance HTML
 
HTML (Basic to Advance)
HTML (Basic to Advance)HTML (Basic to Advance)
HTML (Basic to Advance)
 
Html1
Html1Html1
Html1
 

More from H K

Assignment4
Assignment4Assignment4
Assignment4H K
 
Assignment3
Assignment3Assignment3
Assignment3H K
 
Induction
InductionInduction
InductionH K
 
Solution3
Solution3Solution3
Solution3H K
 
Solution2
Solution2Solution2
Solution2H K
 
Mid-
Mid-Mid-
Mid-H K
 
Assignment4
Assignment4Assignment4
Assignment4H K
 
Assignment4
Assignment4Assignment4
Assignment4H K
 
Dm assignment3
Dm assignment3Dm assignment3
Dm assignment3H K
 
Proof
ProofProof
ProofH K
 
Resolution
ResolutionResolution
ResolutionH K
 
Assignment description
Assignment descriptionAssignment description
Assignment descriptionH K
 
Dm assignment2
Dm assignment2Dm assignment2
Dm assignment2H K
 
Set
SetSet
SetH K
 
Dm assignment1
Dm assignment1Dm assignment1
Dm assignment1H K
 
Logic
LogicLogic
LogicH K
 
Introduction
IntroductionIntroduction
IntroductionH K
 
Assignment 2 sol
Assignment 2 solAssignment 2 sol
Assignment 2 solH K
 
Assignment sw solution
Assignment sw solutionAssignment sw solution
Assignment sw solutionH K
 
Violinphoenix
ViolinphoenixViolinphoenix
ViolinphoenixH K
 

More from 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
 

Recently uploaded

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 

Recently uploaded (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 

Html basics 1

  • 1. Lecture 2 What we will Learn • Heading tag: <h1>, <h2>, <h3>, <h4>, <h5>, <h6> • <br> tag • Comment Tag: <!-- -- > In the last lecture, we learned that the first tag on the web page we made is the HTML tag which tells the browser that the document is HTML; <html> The last tag on the page is the end HTML tag, which tells the browser that the HTML bit has finished; </html> Did you notice the '/' bit which tells the browser that this is the end tag, not the start? Heading Today we will learn about heading tag, which looks like <h1> or <h2> or <h3> or <h4> or <h5> or <h6>. Let us take an example to understand this tag. <html> <head> <title >My Home Page with a heading</title> </head> <body> <h1>My Heading</h1> You write things here... </body> </html> Write the code above and save as an .html file. And the output looks something like this My Heading You write things here…. Take another example <html> <head> <title >My Home Page with a heading</title> </head> <body> <h1>Heading 1</h1>
  • 2. <h2>Heading 2</h2> <h3>Heading 3</h3> <h4>Heading 4</h4> <h5>Heading 5</h5> <h6>Heading 6</h6> <p>This is normal text!</p> </body> </html> And the output is now, Heading 1 Heading 2 Heading 3 Heading 4 Heading 5 Heading 6 This is normal text! So, that was different ways of representing text. Let us study about <br> tag. Please write the code below and save as an .html file <html> <head> <title >My Home Page with a heading</title> </head> <body> My name is Harshit. I am studying at University of Suwon . </body> </html> The output will be My name is Harshit I am studying at University of Suwon Q) Can any one tell me what is the problem with the above output? A) When I wrote the code, I made two lines, one line contains my name and the other line contains the name of University. But the output shows two lines one after the other. So that means, HTML does not interpret the <return> key.
  • 3. The solution to the above problem is <br> take. <br> tag is also called as blank rule. It inserts a line. <html> <head> <title >My Home Page with a heading</title> </head> <body> My name is Harshit. <br> I am studying at University of Suwon . </body> </html> Now the output will be My name is Harshit. I am studying at University of Suwon. Q What is the output for the code below? <html> <head> <title >My Home Page with a heading</title> </head> <body> My name is Harshit. <br> I am studying at University of Suwon. </body> </html> Answer) Comments Q) Why do we need comments?, infact every language supports comments, be it C, C++ or Java? Answer) When we write a page with a lot of code, and we come back to it later to wonder what we did, it can be made easier if we have comments in the document which don't show up in the browser. For example <html> <head> <!-- This is the title of my page
  • 4. <title>My Page</title> </head> <body> <!--This is the start of my page! As if I didn't know that - I did say it was a trivial example!--> <!--Start of my heading--> <h1>My Heading - What my page is about.</h1> <!--End of my heading--> </body> So the output is My Heading - What my page is about. Everthing contained in <!-- -- > is not visible on the browser.