SlideShare una empresa de Scribd logo
1 de 31
Prepared By: Er. Nawaraj
Bhandari
DESIGNING AND DEVELOPING A
WEBSITE
Topic 4:
Hyperlinks
 A key feature of the web is hyperlinks.
 Allows us to surf the web
 There is only one element responsible for creating
hyperlinks.
 The anchor element <a>
Hyperlinks
 The anchor element specifies the enclosed content
is a hyperlink.
 Browsers render the content of hyperlink
elements as underlined text.
 The href attribute specifies the URL of the page to
which the user will be linked.
 In this example - http://www.wwf.org/
The Anchor Element
<p>The <a href="http://www.wwf.org/">World Wide Fund for
Nature (WWF)</a> is an international organisation concerned
with conservation of the natural world.</p>
• The ‘address’ of a resource and how it can
be retrieved
Specifies the location of document on the
web to which we want to create a link
• There are two type of URLs
Absolute
Relative
Uniform Resource Locators (URLs)
 Protocol name
 The mechanism for accessing the resource - http
 Domain name
 The name of the web server where the web page
is stored - www.nhm.ac.uk
Absolute URLs - 1
http://www.nhm.ac.uk/about-us/index.html
protocol domain path
 Pathname
 Specifies the location of the page on the
server – about-us/index.html
 Absolute URLs are used when linking to
web pages in a separate website.
 External hyperlinks
 A website on a different web server
Absolute URLs - 2
 Relative URLs describe the location of a document
relative to the current document’s location.
 Relative URLs are when linking pages together in
the same site.
 Internal hyperlinks
 In your assessment, you will be expected to link
pages together using relative URLs.
Relative URLs - 1
 A hyperlink in the page
culture.html that links to the
page locations.html would look
like
Relative URLs - 2
root
careers news about index.html
benefits.html
locations.html
culture.html investors
financial.html
annual_reports.html
press.html
media.html contact_us.html
our_values.html
<a href="locations.html">locations</a>
 A hyperlink in the page contact_us.html that
links to the page financial.html would look like
Relative URLs - 3
root
careers news about index.html
benefits.html
locations.html
culture.html investors
financial.html
annual_reports.html
press.html
media.html contact_us.html
our_values.html
<a href="investors/financial.html">financial</a>
 A hyperlink in the page media.html
that links to the page index.html
would look like
Relative URLs - 4
root
careers news about index.html
benefits.html
locations.html
culture.html investors
financial.html
annual_reports.html
press.html
media.html contact_us.html
our_values.html
<a href="../index.html">Home</a>
 A hyperlink in the page benefits.html
that links to the page press.html
would look like
Relative URLs - 5
root
careers news about index.html
benefits.html
locations.html
culture.html investors
financial.html
annual_reports.html
press.html
media.html contact_us.html
our_values.html
<a href="../news/press.html">Press Releases</a>
 Do not use spaces in file names or special
characters (e.g. ?,#, /).
 Use letters, numbers, underscores (_) and
hyphens (-)
 Consistently use the same filename extension.
 HTML pages can have an extension of .htm or
.html.
 Use all lowercase letters.
 Some web servers are case-sensitive.
File Naming Conventions - 1
 Keep filenames short.
 Easier to remember
 Place related files into subdirectories.
 Keeps the site organised.
 Name the homepage index.html (or
index.htm).
 Most web servers are configured to serve
a file named index.html as the default
page for a directory.
File Naming Conventions - 2
• It is also possible to link to a different point in the
same document.
 The user does not have to scroll to view content.
• The destination element needs to feature an id
attribute.
 The id attribute uniquely identifies an element.
‘In-Page’ Hyperlinks - 1
<h2 id="sales">Sales and Marketing</h2>
<p>The importance of sales and marketing
to for new businesses is extremely
important...
 To link to this part of the page, the href attribute is the value
of the id attribute preceded by a hash (#).
 We can link to a specific point in a separate page by adding
a hash mark at the end of the URL.
‘In-Page’ Hyperlinks - 2
<h2 id="sales">Sales and Marketing</h2>
<p>The importance of sales and marketing
for new businesses is extremely important...
<a href="#sales">Sales and Marketing</a>
<a href="business_advice.html#sales">Sales and
Marketing</a>
 The title attribute can be used to describe the
content that will be linked.
 Browsers often display the title as a ‘tooltip’.
 The title attribute is not visible by default.
 Should be used to provide additional information
 Important information should not be hidden in a
title attribute.
The Title Attribute
<a href="../news/press.html" title="Read our press
releases">Press Releases</a>
 The XHTML 1.0 Strict specification defines the <a>
element as being an inline element
 Must be nested inside a block level element
 In HTML 5, links can be wrapped around block
level elements.
Hyperlinks and Valid Documents
... just contact us.</p>
<a href="contact.html">Contact Us</a>
<h2>Further Information</h2> …
…<p>
<a href="contact.html">Contact Us</a>
</p>…
Invalid
Valid
 It is common to structure a collection of hyperlinks
as a list.
 Each link is nested inside a <li> element.
Hyperlinks and List Elements
<ul>
<li><a href="careers.html">Careers</a></li>
<li><a href="news.html">News</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact Us</a></li>
</ul>
• HTML 5 introduces a new <nav> element for
grouping together hyperlinks.
 For grouping major navigation blocks
 Provide assistance to screen readers
The HTML 5 <nav> Element
<nav>
<ul>
<li><a href="careers.html">Careers</a></li>
<li><a href="news.html">News</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact Us</a></li>
</ul>
</nav>
 A pseudo-class is used to define a special state of
an element.
 CSS pseudo-classes allow us to select elements
using factors not present in the HTML of a
document.
 The :visited, :hover and :active pseuedo-classes
allow us to style hyperlinks based on the state of
the hyperlink.
 :visited – the user has followed this link
 :hover – the cursor is over the link
 :active – when the link is being activated (clicked)
CSS for Hyperlinks - 1
 Psuedo-classes are commonly used to create
rollover effects for links.
 The psuedo-classes must appear in the order
specified above in order to work correctly.
CSS for Hyperlinks - 2
a{background-color:red}
a:visited{background-color:yellow}
a:hover{background-color:blue}
a:active{background-color:green}
 Many disabled people surf the web using
their keyboard rather than the mouse.
 Using the Tab and Enter keys
 Link text should be understandable out of
context
 Bad example: ‘click here for more
information’
 Good example: ‘product information’
Accessibility and Hyperlinks
 Many websites have large navigation bars.
 Tabbing through these links for keyboard
users can be tedious.
 A skip link allows the user to jump directly to
the content of the page.
 Give a heading element for the content an
id attribute
 A hyperlink at the very top of the page
links directly to this heading element
Skip Links - 1
 The user does not have to tab through all
the navigation options.
 Many sites use CSS to visually hide the skip links.
 Screen readers will still read these links
out as the first elements on the page.
Skip Links - 2
 The accesskey attribute allows us to associate a
specific key with a hyperlink.
 Pressing a modifier key and the specified access
key will make the browser follow the hyperlink.
 In Firefox, the modifier keys are Alt+Shift.
 In IE and Chrome, the modifier key is Alt.
Access Keys - 1
<a href="careers.html" accesskey="c">Careers</a>
• Access keys suffer from a number of problems
 Different browsers use different modifier keys.
 Conflict with browser shortcuts
– Access keys often use numbers to avoid this.
 How does the user know what the access keys
are?
– Provide a list of hyperlinks and their access
keys.
– Use CSS to underline a specific letter in the link
text.
– Indicate the access key after the hyperlinks.
Access Keys - 2
• The tabindex attribute can be used to override the
default tabbing order in a browser.
• The tabindex attribute also has problems.
 Can be confusing for user if their tabbing jumps them
in an unexpected order.
 In above tab index tab first jump to About hyperlink.
Then move to News and then only other hyperlink
who doesn’t have tabindex.
Tab Order
<ul>
<li><a href="careers.html" accesskey="c" >Careers</a></li>
<li><a href="news.html" accesskey="n" tabindex="11">News</a></li>
<li><a href="about.html" accesskey="a" tabindex="10">About</a></li>
<li><a href="contact.html" accesskey="u">Contact Us</a></li>
</ul>
 Users with mobile devices often experience
similar problems as disabled users.
 E.g. navigating through the keypad
 Skip links can be useful
 Use of access keys is often recommended
for sites designed for mobile users.
 Using numbers
 Used consistently can make the site easier
to use
Mobile Devices and Hyperlinks
References
 Chisholm, W. & May, M. (2008). Universal
Design for Web Applications: Web
Applications That Reach Everyone. O'Reilly
Media.
 Lawson, B & Sharp, R. (2010). Introducing
HTML5. Pearson.
 Niederst, J. (2006). Web Design in a
Nutshell: A Desktop Quick Reference.
O'Reilly Media.
 Good link names, bad link names
 Link together all the examples so far
 In page links in the CV
 Link to favourite websites in CV example
 Skip links – find sites that use them; government
sites
Practical
Topic 4 – Hyperlinks
Any Questions?

Más contenido relacionado

La actualidad más candente

Microsoft Word: Working with Tables
Microsoft Word: Working with TablesMicrosoft Word: Working with Tables
Microsoft Word: Working with TablesTiffany Johnson
 
Microsoft Word 2010
Microsoft Word 2010Microsoft Word 2010
Microsoft Word 2010home
 
HYPERLINKING IN WORD AND HYPERLINKING IN PRESENTATION
HYPERLINKING IN WORD AND HYPERLINKING IN PRESENTATIONHYPERLINKING IN WORD AND HYPERLINKING IN PRESENTATION
HYPERLINKING IN WORD AND HYPERLINKING IN PRESENTATIONMariaAngelineNuas1
 
Basic Html Notes
Basic Html NotesBasic Html Notes
Basic Html NotesNextGenr
 
Microsoft PowerPoint 2013
Microsoft PowerPoint 2013Microsoft PowerPoint 2013
Microsoft PowerPoint 2013Arpee Callejo
 
Elements Of Web Design
Elements Of Web DesignElements Of Web Design
Elements Of Web DesignDan Dixon
 
What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)Ahsan Rahim
 
How to create basic webpage
How to create basic webpageHow to create basic webpage
How to create basic webpageJames Erro
 
cascading style sheet ppt
cascading style sheet pptcascading style sheet ppt
cascading style sheet pptabhilashagupta
 
Cascading style sheets (CSS)
Cascading style sheets (CSS)Cascading style sheets (CSS)
Cascading style sheets (CSS)Harshita Yadav
 
The World Wide Web Power Point
The World Wide Web Power PointThe World Wide Web Power Point
The World Wide Web Power Pointkaramfilova
 

La actualidad más candente (20)

HTML
HTMLHTML
HTML
 
HTML Fundamentals
HTML FundamentalsHTML Fundamentals
HTML Fundamentals
 
World wide web
World wide webWorld wide web
World wide web
 
Microsoft Word: Working with Tables
Microsoft Word: Working with TablesMicrosoft Word: Working with Tables
Microsoft Word: Working with Tables
 
MS Word Introduction and Tools.
MS Word Introduction and Tools.MS Word Introduction and Tools.
MS Word Introduction and Tools.
 
Microsoft Word 2010
Microsoft Word 2010Microsoft Word 2010
Microsoft Word 2010
 
HYPERLINKING IN WORD AND HYPERLINKING IN PRESENTATION
HYPERLINKING IN WORD AND HYPERLINKING IN PRESENTATIONHYPERLINKING IN WORD AND HYPERLINKING IN PRESENTATION
HYPERLINKING IN WORD AND HYPERLINKING IN PRESENTATION
 
Basic Html Notes
Basic Html NotesBasic Html Notes
Basic Html Notes
 
Microsoft PowerPoint 2013
Microsoft PowerPoint 2013Microsoft PowerPoint 2013
Microsoft PowerPoint 2013
 
Html frames
Html framesHtml frames
Html frames
 
Elements Of Web Design
Elements Of Web DesignElements Of Web Design
Elements Of Web Design
 
Learning power point 2016
Learning power point 2016Learning power point 2016
Learning power point 2016
 
What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)What is HTML - An Introduction to HTML (Hypertext Markup Language)
What is HTML - An Introduction to HTML (Hypertext Markup Language)
 
HTML Lesson 1
HTML Lesson 1HTML Lesson 1
HTML Lesson 1
 
How to create basic webpage
How to create basic webpageHow to create basic webpage
How to create basic webpage
 
cascading style sheet ppt
cascading style sheet pptcascading style sheet ppt
cascading style sheet ppt
 
Cascading style sheets (CSS)
Cascading style sheets (CSS)Cascading style sheets (CSS)
Cascading style sheets (CSS)
 
The World Wide Web Power Point
The World Wide Web Power PointThe World Wide Web Power Point
The World Wide Web Power Point
 
HTML Tags
HTML TagsHTML Tags
HTML Tags
 
Css pseudo-classes
Css pseudo-classesCss pseudo-classes
Css pseudo-classes
 

Similar a Hyperlink

SEO Training in Mahabubnagar
SEO Training in MahabubnagarSEO Training in Mahabubnagar
SEO Training in MahabubnagarSubhash Malgam
 
HTML5 - create hyperlinks and anchors
HTML5 - create hyperlinks and anchorsHTML5 - create hyperlinks and anchors
HTML5 - create hyperlinks and anchorsGrayzon Gonzales, LPT
 
Website analysis report
Website analysis reportWebsite analysis report
Website analysis reportvimlesh88
 
Technical SEO Introduction
Technical SEO IntroductionTechnical SEO Introduction
Technical SEO IntroductionEitan Helman
 
Word press optimization secrets
Word press optimization secretsWord press optimization secrets
Word press optimization secretssaeedmari
 
FYBSC IT Web Programming Unit II Html Page Layout & Navigation
FYBSC IT Web Programming Unit II Html Page Layout & NavigationFYBSC IT Web Programming Unit II Html Page Layout & Navigation
FYBSC IT Web Programming Unit II Html Page Layout & NavigationArti Parab Academics
 
A complete digital marketing sop divay jain ( profshine tech )
A complete digital marketing sop  divay jain ( profshine tech )A complete digital marketing sop  divay jain ( profshine tech )
A complete digital marketing sop divay jain ( profshine tech )Divay Jain
 
SEO Training in Chandigarh
SEO Training in ChandigarhSEO Training in Chandigarh
SEO Training in Chandigarhvicky shah
 
SEO Training in Hyderabad | SEO Classes in Hyderbad | SEO Coaching in Hyde...
SEO Training in Hyderabad |  SEO  Classes in Hyderbad | SEO Coaching in  Hyde...SEO Training in Hyderabad |  SEO  Classes in Hyderbad | SEO Coaching in  Hyde...
SEO Training in Hyderabad | SEO Classes in Hyderbad | SEO Coaching in Hyde...Prasad Reddy
 
Rapid HTML Prototyping with Bootstrap 4
Rapid HTML Prototyping with Bootstrap 4Rapid HTML Prototyping with Bootstrap 4
Rapid HTML Prototyping with Bootstrap 4UXPA International
 
Hypertext presentation
Hypertext presentationHypertext presentation
Hypertext presentationIftikhar Alam
 
Just Enough HTML for Fatwire
Just Enough HTML for FatwireJust Enough HTML for Fatwire
Just Enough HTML for FatwireKenneth Quandt
 
SEO-Presentation-2023.pptx
SEO-Presentation-2023.pptxSEO-Presentation-2023.pptx
SEO-Presentation-2023.pptxVijayYadav877384
 
Searching for Users: SEO as an Engine for Customer Acquisition (Stephan Spenc...
Searching for Users: SEO as an Engine for Customer Acquisition (Stephan Spenc...Searching for Users: SEO as an Engine for Customer Acquisition (Stephan Spenc...
Searching for Users: SEO as an Engine for Customer Acquisition (Stephan Spenc...Dealmaker Media
 
Understanding & Using Search Engine Optimization
Understanding & Using Search Engine OptimizationUnderstanding & Using Search Engine Optimization
Understanding & Using Search Engine OptimizationifPeople
 

Similar a Hyperlink (20)

SEO Training in Mahabubnagar
SEO Training in MahabubnagarSEO Training in Mahabubnagar
SEO Training in Mahabubnagar
 
HTML5 - create hyperlinks and anchors
HTML5 - create hyperlinks and anchorsHTML5 - create hyperlinks and anchors
HTML5 - create hyperlinks and anchors
 
Website analysis report
Website analysis reportWebsite analysis report
Website analysis report
 
Technical SEO Introduction
Technical SEO IntroductionTechnical SEO Introduction
Technical SEO Introduction
 
Word press optimization secrets
Word press optimization secretsWord press optimization secrets
Word press optimization secrets
 
Seo basics
Seo basicsSeo basics
Seo basics
 
FYBSC IT Web Programming Unit II Html Page Layout & Navigation
FYBSC IT Web Programming Unit II Html Page Layout & NavigationFYBSC IT Web Programming Unit II Html Page Layout & Navigation
FYBSC IT Web Programming Unit II Html Page Layout & Navigation
 
A complete digital marketing sop divay jain ( profshine tech )
A complete digital marketing sop  divay jain ( profshine tech )A complete digital marketing sop  divay jain ( profshine tech )
A complete digital marketing sop divay jain ( profshine tech )
 
SEO Training in Chandigarh
SEO Training in ChandigarhSEO Training in Chandigarh
SEO Training in Chandigarh
 
Lvr ppt
Lvr pptLvr ppt
Lvr ppt
 
SEO Training in Hyderabad | SEO Classes in Hyderbad | SEO Coaching in Hyde...
SEO Training in Hyderabad |  SEO  Classes in Hyderbad | SEO Coaching in  Hyde...SEO Training in Hyderabad |  SEO  Classes in Hyderbad | SEO Coaching in  Hyde...
SEO Training in Hyderabad | SEO Classes in Hyderbad | SEO Coaching in Hyde...
 
Rapid HTML Prototyping with Bootstrap 4
Rapid HTML Prototyping with Bootstrap 4Rapid HTML Prototyping with Bootstrap 4
Rapid HTML Prototyping with Bootstrap 4
 
Hypertext presentation
Hypertext presentationHypertext presentation
Hypertext presentation
 
Just Enough HTML for Fatwire
Just Enough HTML for FatwireJust Enough HTML for Fatwire
Just Enough HTML for Fatwire
 
SEO-Presentation-2023.pptx
SEO-Presentation-2023.pptxSEO-Presentation-2023.pptx
SEO-Presentation-2023.pptx
 
Searching for Users: SEO as an Engine for Customer Acquisition (Stephan Spenc...
Searching for Users: SEO as an Engine for Customer Acquisition (Stephan Spenc...Searching for Users: SEO as an Engine for Customer Acquisition (Stephan Spenc...
Searching for Users: SEO as an Engine for Customer Acquisition (Stephan Spenc...
 
HTML5 - An introduction
HTML5 - An introductionHTML5 - An introduction
HTML5 - An introduction
 
Sacramento web design
Sacramento web designSacramento web design
Sacramento web design
 
Understanding & Using Search Engine Optimization
Understanding & Using Search Engine OptimizationUnderstanding & Using Search Engine Optimization
Understanding & Using Search Engine Optimization
 
HTML5 introduction
HTML5 introductionHTML5 introduction
HTML5 introduction
 

Más de Er. Nawaraj Bhandari

Data mining approaches and methods
Data mining approaches and methodsData mining approaches and methods
Data mining approaches and methodsEr. Nawaraj Bhandari
 
Research trends in data warehousing and data mining
Research trends in data warehousing and data miningResearch trends in data warehousing and data mining
Research trends in data warehousing and data miningEr. Nawaraj Bhandari
 
Mining Association Rules in Large Database
Mining Association Rules in Large DatabaseMining Association Rules in Large Database
Mining Association Rules in Large DatabaseEr. Nawaraj Bhandari
 
Introduction to data mining and data warehousing
Introduction to data mining and data warehousingIntroduction to data mining and data warehousing
Introduction to data mining and data warehousingEr. Nawaraj Bhandari
 
Classification and prediction in data mining
Classification and prediction in data miningClassification and prediction in data mining
Classification and prediction in data miningEr. Nawaraj Bhandari
 
Chapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean FunctionChapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean FunctionEr. Nawaraj Bhandari
 
Chapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIChapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIEr. Nawaraj Bhandari
 
Chapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic GatesChapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic GatesEr. Nawaraj Bhandari
 
Introduction to Electronic Commerce
Introduction to Electronic CommerceIntroduction to Electronic Commerce
Introduction to Electronic CommerceEr. Nawaraj Bhandari
 
Using macros in microsoft excel part 2
Using macros in microsoft excel   part 2Using macros in microsoft excel   part 2
Using macros in microsoft excel part 2Er. Nawaraj Bhandari
 
Using macros in microsoft excel part 1
Using macros in microsoft excel   part 1Using macros in microsoft excel   part 1
Using macros in microsoft excel part 1Er. Nawaraj Bhandari
 

Más de Er. Nawaraj Bhandari (20)

Data mining approaches and methods
Data mining approaches and methodsData mining approaches and methods
Data mining approaches and methods
 
Research trends in data warehousing and data mining
Research trends in data warehousing and data miningResearch trends in data warehousing and data mining
Research trends in data warehousing and data mining
 
Mining Association Rules in Large Database
Mining Association Rules in Large DatabaseMining Association Rules in Large Database
Mining Association Rules in Large Database
 
Introduction to data mining and data warehousing
Introduction to data mining and data warehousingIntroduction to data mining and data warehousing
Introduction to data mining and data warehousing
 
Data warehouse testing
Data warehouse testingData warehouse testing
Data warehouse testing
 
Data warehouse physical design
Data warehouse physical designData warehouse physical design
Data warehouse physical design
 
Data warehouse logical design
Data warehouse logical designData warehouse logical design
Data warehouse logical design
 
Classification and prediction in data mining
Classification and prediction in data miningClassification and prediction in data mining
Classification and prediction in data mining
 
Chapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean FunctionChapter 3: Simplification of Boolean Function
Chapter 3: Simplification of Boolean Function
 
Chapter 6: Sequential Logic
Chapter 6: Sequential LogicChapter 6: Sequential Logic
Chapter 6: Sequential Logic
 
Chapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSIChapter 5: Cominational Logic with MSI and LSI
Chapter 5: Cominational Logic with MSI and LSI
 
Chapter 4: Combinational Logic
Chapter 4: Combinational LogicChapter 4: Combinational Logic
Chapter 4: Combinational Logic
 
Chapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic GatesChapter 2: Boolean Algebra and Logic Gates
Chapter 2: Boolean Algebra and Logic Gates
 
Chapter 1: Binary System
 Chapter 1: Binary System Chapter 1: Binary System
Chapter 1: Binary System
 
Introduction to Electronic Commerce
Introduction to Electronic CommerceIntroduction to Electronic Commerce
Introduction to Electronic Commerce
 
Evaluating software development
Evaluating software developmentEvaluating software development
Evaluating software development
 
Using macros in microsoft excel part 2
Using macros in microsoft excel   part 2Using macros in microsoft excel   part 2
Using macros in microsoft excel part 2
 
Using macros in microsoft excel part 1
Using macros in microsoft excel   part 1Using macros in microsoft excel   part 1
Using macros in microsoft excel part 1
 
Using macros in microsoft access
Using macros in microsoft accessUsing macros in microsoft access
Using macros in microsoft access
 
Testing software development
Testing software developmentTesting software development
Testing software development
 

Último

ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdfssuserdda66b
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 

Último (20)

ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 

Hyperlink

  • 1. Prepared By: Er. Nawaraj Bhandari DESIGNING AND DEVELOPING A WEBSITE Topic 4: Hyperlinks
  • 2.  A key feature of the web is hyperlinks.  Allows us to surf the web  There is only one element responsible for creating hyperlinks.  The anchor element <a> Hyperlinks
  • 3.  The anchor element specifies the enclosed content is a hyperlink.  Browsers render the content of hyperlink elements as underlined text.  The href attribute specifies the URL of the page to which the user will be linked.  In this example - http://www.wwf.org/ The Anchor Element <p>The <a href="http://www.wwf.org/">World Wide Fund for Nature (WWF)</a> is an international organisation concerned with conservation of the natural world.</p>
  • 4. • The ‘address’ of a resource and how it can be retrieved Specifies the location of document on the web to which we want to create a link • There are two type of URLs Absolute Relative Uniform Resource Locators (URLs)
  • 5.  Protocol name  The mechanism for accessing the resource - http  Domain name  The name of the web server where the web page is stored - www.nhm.ac.uk Absolute URLs - 1 http://www.nhm.ac.uk/about-us/index.html protocol domain path
  • 6.  Pathname  Specifies the location of the page on the server – about-us/index.html  Absolute URLs are used when linking to web pages in a separate website.  External hyperlinks  A website on a different web server Absolute URLs - 2
  • 7.  Relative URLs describe the location of a document relative to the current document’s location.  Relative URLs are when linking pages together in the same site.  Internal hyperlinks  In your assessment, you will be expected to link pages together using relative URLs. Relative URLs - 1
  • 8.  A hyperlink in the page culture.html that links to the page locations.html would look like Relative URLs - 2 root careers news about index.html benefits.html locations.html culture.html investors financial.html annual_reports.html press.html media.html contact_us.html our_values.html <a href="locations.html">locations</a>
  • 9.  A hyperlink in the page contact_us.html that links to the page financial.html would look like Relative URLs - 3 root careers news about index.html benefits.html locations.html culture.html investors financial.html annual_reports.html press.html media.html contact_us.html our_values.html <a href="investors/financial.html">financial</a>
  • 10.  A hyperlink in the page media.html that links to the page index.html would look like Relative URLs - 4 root careers news about index.html benefits.html locations.html culture.html investors financial.html annual_reports.html press.html media.html contact_us.html our_values.html <a href="../index.html">Home</a>
  • 11.  A hyperlink in the page benefits.html that links to the page press.html would look like Relative URLs - 5 root careers news about index.html benefits.html locations.html culture.html investors financial.html annual_reports.html press.html media.html contact_us.html our_values.html <a href="../news/press.html">Press Releases</a>
  • 12.  Do not use spaces in file names or special characters (e.g. ?,#, /).  Use letters, numbers, underscores (_) and hyphens (-)  Consistently use the same filename extension.  HTML pages can have an extension of .htm or .html.  Use all lowercase letters.  Some web servers are case-sensitive. File Naming Conventions - 1
  • 13.  Keep filenames short.  Easier to remember  Place related files into subdirectories.  Keeps the site organised.  Name the homepage index.html (or index.htm).  Most web servers are configured to serve a file named index.html as the default page for a directory. File Naming Conventions - 2
  • 14. • It is also possible to link to a different point in the same document.  The user does not have to scroll to view content. • The destination element needs to feature an id attribute.  The id attribute uniquely identifies an element. ‘In-Page’ Hyperlinks - 1 <h2 id="sales">Sales and Marketing</h2> <p>The importance of sales and marketing to for new businesses is extremely important...
  • 15.  To link to this part of the page, the href attribute is the value of the id attribute preceded by a hash (#).  We can link to a specific point in a separate page by adding a hash mark at the end of the URL. ‘In-Page’ Hyperlinks - 2 <h2 id="sales">Sales and Marketing</h2> <p>The importance of sales and marketing for new businesses is extremely important... <a href="#sales">Sales and Marketing</a> <a href="business_advice.html#sales">Sales and Marketing</a>
  • 16.  The title attribute can be used to describe the content that will be linked.  Browsers often display the title as a ‘tooltip’.  The title attribute is not visible by default.  Should be used to provide additional information  Important information should not be hidden in a title attribute. The Title Attribute <a href="../news/press.html" title="Read our press releases">Press Releases</a>
  • 17.  The XHTML 1.0 Strict specification defines the <a> element as being an inline element  Must be nested inside a block level element  In HTML 5, links can be wrapped around block level elements. Hyperlinks and Valid Documents ... just contact us.</p> <a href="contact.html">Contact Us</a> <h2>Further Information</h2> … …<p> <a href="contact.html">Contact Us</a> </p>… Invalid Valid
  • 18.  It is common to structure a collection of hyperlinks as a list.  Each link is nested inside a <li> element. Hyperlinks and List Elements <ul> <li><a href="careers.html">Careers</a></li> <li><a href="news.html">News</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact Us</a></li> </ul>
  • 19. • HTML 5 introduces a new <nav> element for grouping together hyperlinks.  For grouping major navigation blocks  Provide assistance to screen readers The HTML 5 <nav> Element <nav> <ul> <li><a href="careers.html">Careers</a></li> <li><a href="news.html">News</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact Us</a></li> </ul> </nav>
  • 20.  A pseudo-class is used to define a special state of an element.  CSS pseudo-classes allow us to select elements using factors not present in the HTML of a document.  The :visited, :hover and :active pseuedo-classes allow us to style hyperlinks based on the state of the hyperlink.  :visited – the user has followed this link  :hover – the cursor is over the link  :active – when the link is being activated (clicked) CSS for Hyperlinks - 1
  • 21.  Psuedo-classes are commonly used to create rollover effects for links.  The psuedo-classes must appear in the order specified above in order to work correctly. CSS for Hyperlinks - 2 a{background-color:red} a:visited{background-color:yellow} a:hover{background-color:blue} a:active{background-color:green}
  • 22.  Many disabled people surf the web using their keyboard rather than the mouse.  Using the Tab and Enter keys  Link text should be understandable out of context  Bad example: ‘click here for more information’  Good example: ‘product information’ Accessibility and Hyperlinks
  • 23.  Many websites have large navigation bars.  Tabbing through these links for keyboard users can be tedious.  A skip link allows the user to jump directly to the content of the page.  Give a heading element for the content an id attribute  A hyperlink at the very top of the page links directly to this heading element Skip Links - 1
  • 24.  The user does not have to tab through all the navigation options.  Many sites use CSS to visually hide the skip links.  Screen readers will still read these links out as the first elements on the page. Skip Links - 2
  • 25.  The accesskey attribute allows us to associate a specific key with a hyperlink.  Pressing a modifier key and the specified access key will make the browser follow the hyperlink.  In Firefox, the modifier keys are Alt+Shift.  In IE and Chrome, the modifier key is Alt. Access Keys - 1 <a href="careers.html" accesskey="c">Careers</a>
  • 26. • Access keys suffer from a number of problems  Different browsers use different modifier keys.  Conflict with browser shortcuts – Access keys often use numbers to avoid this.  How does the user know what the access keys are? – Provide a list of hyperlinks and their access keys. – Use CSS to underline a specific letter in the link text. – Indicate the access key after the hyperlinks. Access Keys - 2
  • 27. • The tabindex attribute can be used to override the default tabbing order in a browser. • The tabindex attribute also has problems.  Can be confusing for user if their tabbing jumps them in an unexpected order.  In above tab index tab first jump to About hyperlink. Then move to News and then only other hyperlink who doesn’t have tabindex. Tab Order <ul> <li><a href="careers.html" accesskey="c" >Careers</a></li> <li><a href="news.html" accesskey="n" tabindex="11">News</a></li> <li><a href="about.html" accesskey="a" tabindex="10">About</a></li> <li><a href="contact.html" accesskey="u">Contact Us</a></li> </ul>
  • 28.  Users with mobile devices often experience similar problems as disabled users.  E.g. navigating through the keypad  Skip links can be useful  Use of access keys is often recommended for sites designed for mobile users.  Using numbers  Used consistently can make the site easier to use Mobile Devices and Hyperlinks
  • 29. References  Chisholm, W. & May, M. (2008). Universal Design for Web Applications: Web Applications That Reach Everyone. O'Reilly Media.  Lawson, B & Sharp, R. (2010). Introducing HTML5. Pearson.  Niederst, J. (2006). Web Design in a Nutshell: A Desktop Quick Reference. O'Reilly Media.
  • 30.  Good link names, bad link names  Link together all the examples so far  In page links in the CV  Link to favourite websites in CV example  Skip links – find sites that use them; government sites Practical
  • 31. Topic 4 – Hyperlinks Any Questions?