SlideShare a Scribd company logo
1 of 5
Lecture 5


Today we will learn
   • Create a Link to new pages using <a href=””>.
   • Writing the text as a List of Items using <UL>, <LI>, <OL>.

Creating a link to a new page mean that you make one web page which contains a link to
another page and when you click on the link, another page opens. For example

Type the following code and save as first.html
<html>
<head>
       <title> First Page</title>
</head>
</body>
       My name is Harshit Kumar. <br>
       I am teaching at Suwon University <br>
       To know about my hobbies, <a href="hobby.html">click here</a>
</body>
</html>

Now what you will see in the output is, an underline below ‘Click here’ and the color will
be blue. This is a link, which links to a new page, and all the links appear as blue color
i.e.
The output will be

My name is Harshit Kumar.
I am teaching at Suwon University
To know about my hobbies click here

When you will left click mouse on the link ‘click here’, a new web-page hobby.html
should open. But as such hobby.html is not created. So we need to create this page also.
If clicking on a link displays ‘The link cannot be displayed’, then such a link is called as
broken link. A web-site should not contain broken link.

Now you can type the code below and save as hobby.html, remember that hobby.html
should be saved in the same directory which contains first.html.
<html>
<head>
       <title>This is my hobby page</title>
</head>
<body>
       <b>My hobbies are</b><br>
               <p align="center">Football</p>
               <p align="center">Listening Music </p>
               <p align="center">Reading</p>
</body>
</html>
After clicking on the ‘click here’, a new page hobby.html will open, and the output will
be

My hobbies are

                                          Football

                                     Listening Music

                                          Reading


The <a href=””> is also called as anchor tag.

Q) What will happen if the <a> tag is used as follows, and use click on “click here”
<a href=””> click here </a> ?
A) The same page will be refreshed again.


Q) I told you that both the html files i.e. first.html and hobbies.html should be in the
same directory, what if both of them are not in the same directory?
A) The answer to this is relative addressing, which we will discuss in later lecture, but
right now remember the word relative addressing.

I listed above my hobbies; there is a tag which helps in listing. The name of the tag is
<UL> tag. <UL> tag is also known as Un-ordered List tag.

Write the code below which does not use <UL> tag, and save as hobby.html.

<html>
<head>
       <title>This is my hobby page</title>
</head>
<body>
       <b>My hobbies are</b><br>

               <p>Football</p>
               <p>Listening Music </p>
               <p>Reading</p>
</body>
</html>

After clicking on the ‘click here’, a new page hobby.html will open, and the output will
be
My hobbies are

Football
Listening Music

Reading

So, there is not proper indentation. The hobbies football, listening music, reading should
appear towards the right.

The <UL> tag will do the required indentation.
<html>
<head>
       <title>This is my hobby page</title>
</head>
<body>
       <b>My hobbies are</b><br>
       <ul>
               <p>Football</p>
               <p>Listening Music </p>
               <p>Reading</p>
       </ul>

</body>
</html>

And, now the output is
My hobbies are

       Football

       Listening Music

       Reading

So, now the hobbies football, Listening music, Reading are indented towards the right.

I can further improve upon the hobbies listing.

Q) How can I have a bullet (dark solid circle) before each hobby?
A) There is different tag called as <LI> which is used with the <UL> tag.

Type the code below in notepad and save as hobby.html
<html>
<head>
       <title>This is my hobby page</title>
</head>
<body>
       <b>My hobbies are</b><br>
       <ul>
               <li>Football</li>
               <li>Listening Music </li>
<li>Reading</li>
       </ul>

</body>
</html>


So, the output is
My hobbies are

   •   Football
   •   Listening Music
   •   Reading

What I have done, I have replaced the <p> tag with the <li> tag, still keeping the <ul>
tag.

Q) What if I want numbers instead of bullets?
A) For that, I have to replace <UL> with <OL>.

Please type the code below in notepad and save as hobby.html

<html>
<head>
       <title>This is my hobby page</title>
</head>
<body>
       <b>My hobbies are</b><br>
       <ol>
               <li>Football</li>
               <li>Listening Music </li>
               <li>Reading</li>
       </ol>

</body>
</html>

The output will be
My hobbies are

   1. Football
   2. Listening Music
   3. Reading

We can also do nesting of lists, for details see below.
Nested Lists

Write the following code and save as .html file

<html>
<head>
       <title>Country visit</title>
</head>
<body>
       <b>The countries and cities that I have visited are</b><br>
       <UL>
              <li>Oman</li>
                     <UL>
                              <li>Muscat</li>
                              <li>Salalah</li>
                              <li>Nizwa</li>
                     </UL>
              <li>South korea</li>
                     <ul>
                              <li>Seoul</li>
                              <li>Suwon</li>
                              <li>incheon</li>
                     </Ul>

        </UL>

</body>
</html>


The output will be

The countries and cities that I have visited are

    •   Oman
             o Muscat
             o Salalah
             o Nizwa
    •   South korea
           o Seoul
           o Suwon
           o incheon

Oman and South Korea are countries. Muscat, Salalah, Nizwa are cities in Oman whereas
Seoul, Suwon, Incheon are cities in South Korea.

--------------------------------------------------------Finish--------------------------------------------

More Related Content

Viewers also liked

Html basics 8 frame
Html basics 8 frameHtml basics 8 frame
Html basics 8 frameH K
 
Assignment sw
Assignment swAssignment sw
Assignment swH K
 
Week32
Week32Week32
Week32H K
 
Week4142
Week4142Week4142
Week4142H K
 
Ip protocol tedting
Ip protocol tedtingIp protocol tedting
Ip protocol tedtingH K
 
Lecture20 tcp
Lecture20 tcpLecture20 tcp
Lecture20 tcpH K
 
Lecture3layered archi
Lecture3layered archiLecture3layered archi
Lecture3layered archiH K
 

Viewers also liked (8)

Html basics 8 frame
Html basics 8 frameHtml basics 8 frame
Html basics 8 frame
 
02html Frames
02html Frames02html Frames
02html Frames
 
Assignment sw
Assignment swAssignment sw
Assignment sw
 
Week32
Week32Week32
Week32
 
Week4142
Week4142Week4142
Week4142
 
Ip protocol tedting
Ip protocol tedtingIp protocol tedting
Ip protocol tedting
 
Lecture20 tcp
Lecture20 tcpLecture20 tcp
Lecture20 tcp
 
Lecture3layered archi
Lecture3layered archiLecture3layered archi
Lecture3layered archi
 

Similar to Html basics 4 anchor list

Html basics 1
Html basics 1Html basics 1
Html basics 1H K
 
Html introduction by ikram niaz
Html introduction by ikram niazHtml introduction by ikram niaz
Html introduction by ikram niazikram niaz
 
Html basics 6 image
Html basics 6 imageHtml basics 6 image
Html basics 6 imageH K
 
マークアップの最適解を
見つけ出す方法
マークアップの最適解を
見つけ出す方法マークアップの最適解を
見つけ出す方法
マークアップの最適解を
見つけ出す方法Kasumi Morita
 
Web Design-III IT.ppt
Web Design-III IT.pptWeb Design-III IT.ppt
Web Design-III IT.pptbanu236831
 
Html project report12
Html project report12Html project report12
Html project report12varunmaini123
 
LIS3353 SP12 Week 4
LIS3353 SP12 Week 4LIS3353 SP12 Week 4
LIS3353 SP12 Week 4Amanda Case
 
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 bangalorefathima12
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to htmlvinita mathur
 
All About HTML Web Development and its fundamentals
All About HTML Web Development and its fundamentalsAll About HTML Web Development and its fundamentals
All About HTML Web Development and its fundamentalsBzbbBryanBasco
 
Web Information Systems Lecture 2: HTML
Web Information Systems Lecture 2: HTMLWeb Information Systems Lecture 2: HTML
Web Information Systems Lecture 2: HTMLKatrien Verbert
 

Similar to Html basics 4 anchor list (20)

Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
Html basics 1
Html basics 1Html basics 1
Html basics 1
 
Html introduction by ikram niaz
Html introduction by ikram niazHtml introduction by ikram niaz
Html introduction by ikram niaz
 
Html basics 6 image
Html basics 6 imageHtml basics 6 image
Html basics 6 image
 
マークアップの最適解を
見つけ出す方法
マークアップの最適解を
見つけ出す方法マークアップの最適解を
見つけ出す方法
マークアップの最適解を
見つけ出す方法
 
Web Design-III IT.ppt
Web Design-III IT.pptWeb Design-III IT.ppt
Web Design-III IT.ppt
 
Html project report12
Html project report12Html project report12
Html project report12
 
Coding
CodingCoding
Coding
 
LIS3353 SP12 Week 4
LIS3353 SP12 Week 4LIS3353 SP12 Week 4
LIS3353 SP12 Week 4
 
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
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
All About HTML Web Development and its fundamentals
All About HTML Web Development and its fundamentalsAll About HTML Web Development and its fundamentals
All About HTML Web Development and its fundamentals
 
html
htmlhtml
html
 
Web1
Web1Web1
Web1
 
HTML Lesson 1
HTML Lesson 1HTML Lesson 1
HTML Lesson 1
 
Beginning html
Beginning  htmlBeginning  html
Beginning html
 
HTML ppt.pptx
HTML ppt.pptxHTML ppt.pptx
HTML ppt.pptx
 
Web Information Systems Lecture 2: HTML
Web Information Systems Lecture 2: HTMLWeb Information Systems Lecture 2: HTML
Web Information Systems Lecture 2: HTML
 
WTL1HTML-TEXT.ppt
WTL1HTML-TEXT.pptWTL1HTML-TEXT.ppt
WTL1HTML-TEXT.ppt
 
Html and-css
Html and-cssHtml and-css
Html and-css
 

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

Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 

Recently uploaded (20)

Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 

Html basics 4 anchor list

  • 1. Lecture 5 Today we will learn • Create a Link to new pages using <a href=””>. • Writing the text as a List of Items using <UL>, <LI>, <OL>. Creating a link to a new page mean that you make one web page which contains a link to another page and when you click on the link, another page opens. For example Type the following code and save as first.html <html> <head> <title> First Page</title> </head> </body> My name is Harshit Kumar. <br> I am teaching at Suwon University <br> To know about my hobbies, <a href="hobby.html">click here</a> </body> </html> Now what you will see in the output is, an underline below ‘Click here’ and the color will be blue. This is a link, which links to a new page, and all the links appear as blue color i.e. The output will be My name is Harshit Kumar. I am teaching at Suwon University To know about my hobbies click here When you will left click mouse on the link ‘click here’, a new web-page hobby.html should open. But as such hobby.html is not created. So we need to create this page also. If clicking on a link displays ‘The link cannot be displayed’, then such a link is called as broken link. A web-site should not contain broken link. Now you can type the code below and save as hobby.html, remember that hobby.html should be saved in the same directory which contains first.html. <html> <head> <title>This is my hobby page</title> </head> <body> <b>My hobbies are</b><br> <p align="center">Football</p> <p align="center">Listening Music </p> <p align="center">Reading</p> </body> </html>
  • 2. After clicking on the ‘click here’, a new page hobby.html will open, and the output will be My hobbies are Football Listening Music Reading The <a href=””> is also called as anchor tag. Q) What will happen if the <a> tag is used as follows, and use click on “click here” <a href=””> click here </a> ? A) The same page will be refreshed again. Q) I told you that both the html files i.e. first.html and hobbies.html should be in the same directory, what if both of them are not in the same directory? A) The answer to this is relative addressing, which we will discuss in later lecture, but right now remember the word relative addressing. I listed above my hobbies; there is a tag which helps in listing. The name of the tag is <UL> tag. <UL> tag is also known as Un-ordered List tag. Write the code below which does not use <UL> tag, and save as hobby.html. <html> <head> <title>This is my hobby page</title> </head> <body> <b>My hobbies are</b><br> <p>Football</p> <p>Listening Music </p> <p>Reading</p> </body> </html> After clicking on the ‘click here’, a new page hobby.html will open, and the output will be My hobbies are Football
  • 3. Listening Music Reading So, there is not proper indentation. The hobbies football, listening music, reading should appear towards the right. The <UL> tag will do the required indentation. <html> <head> <title>This is my hobby page</title> </head> <body> <b>My hobbies are</b><br> <ul> <p>Football</p> <p>Listening Music </p> <p>Reading</p> </ul> </body> </html> And, now the output is My hobbies are Football Listening Music Reading So, now the hobbies football, Listening music, Reading are indented towards the right. I can further improve upon the hobbies listing. Q) How can I have a bullet (dark solid circle) before each hobby? A) There is different tag called as <LI> which is used with the <UL> tag. Type the code below in notepad and save as hobby.html <html> <head> <title>This is my hobby page</title> </head> <body> <b>My hobbies are</b><br> <ul> <li>Football</li> <li>Listening Music </li>
  • 4. <li>Reading</li> </ul> </body> </html> So, the output is My hobbies are • Football • Listening Music • Reading What I have done, I have replaced the <p> tag with the <li> tag, still keeping the <ul> tag. Q) What if I want numbers instead of bullets? A) For that, I have to replace <UL> with <OL>. Please type the code below in notepad and save as hobby.html <html> <head> <title>This is my hobby page</title> </head> <body> <b>My hobbies are</b><br> <ol> <li>Football</li> <li>Listening Music </li> <li>Reading</li> </ol> </body> </html> The output will be My hobbies are 1. Football 2. Listening Music 3. Reading We can also do nesting of lists, for details see below.
  • 5. Nested Lists Write the following code and save as .html file <html> <head> <title>Country visit</title> </head> <body> <b>The countries and cities that I have visited are</b><br> <UL> <li>Oman</li> <UL> <li>Muscat</li> <li>Salalah</li> <li>Nizwa</li> </UL> <li>South korea</li> <ul> <li>Seoul</li> <li>Suwon</li> <li>incheon</li> </Ul> </UL> </body> </html> The output will be The countries and cities that I have visited are • Oman o Muscat o Salalah o Nizwa • South korea o Seoul o Suwon o incheon Oman and South Korea are countries. Muscat, Salalah, Nizwa are cities in Oman whereas Seoul, Suwon, Incheon are cities in South Korea. --------------------------------------------------------Finish--------------------------------------------