HTML5, CSS3, and JavaScript Fourth Edition

(Ben Green) #1

CHAPTER 6. USING EXTERNAL RESOURCES 62


6.3.2 Fragment in Same Page


Within your current page, you can use a Fragment ID to specify the place
to which you want to jump.


Go to ID abc in this webpage


This is section abc


6.3.3 Fragment in Different Page


Within a different webpage, you can use a Fragment ID to specify the place
to which you want to jump.


Go to ID abc in page xyz


6.3.4 target=blank


Thea taghas an attributetargetthat can be used for several purposes, the
most important of which may be causing a new tab to open in the browser.


target=_blank


Go to XYZ in a new tab


BE CAREFUL with this as it can be very annoying to the user.


Historically, HTML4 walked away from this capability, believing that the
choice of whether to open a new tab should be left to the user, and not
under the control of the webpage designer.


HTML5 has reversed that decision, andtarget=_blankis now established
as a standard part of the HTML language.


Exam Question 104(p.342): To open a link in a new tab, what HTML
attribute=value should you use?
Acceptable Answer:target=blank


6.3.5 Docroot and Path


As the website developer, you must put the content into the proper directo-
ries and files so it can be found when it is requested.


When a webpage is requested, the webhost splits the URL into a domain

Free download pdf