4 Links Flashcards

1
Q

Create a link to an external website

A

&lta href=”http://www.imdb.com”>IMDB&lt/a>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What happens with this code?

&lta href=”www.imdb.com”>IMDB&lt/a>

A

Goes to the relative location, looks for www.imdb.com within the same folder as your html file is.
have to use http:// before the website so it knows to look on the web.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does URL stand for

A

Uniform Resource Locator.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Difference between absolute URL and relative URL

A

Absolute starts with the domain name for that site.

Relative don’t need to specify domain name.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Create a relative link to another page of your website

A

&lta href=”index.html”>Home&lt/a>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does href stand for

A

Hypertext reference

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Reference a file in the same folder

A

&lta href=”reviews.html”> Reviews &lt/a>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Reference a file in a child or grandchild folder

A

(1 folder forward)

&lta href=”music/listings.html”> Listings &lt/a>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Reference a file in a parent or grandparent folder

A

(2 folders back)

&lta href=”../../index.html”> Home &lt/a>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What happens if you reference a folder without referencing a file?

A

It looks for index.html

If not there it shows the folders contents

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What happens when you reference forward slash (/) ?

A

Usually returns the homepage of entire site (index.html or shows folder contents if not there)
It will show the hard drive if just opened the HTML file from file explorer
Will show the directory of file that started the live server if started from live server
Likely website homepage if opened on a website.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Create an email address link

A

mailto:emailaddress within the href attribute

&lta href=”mailto:jon@example.org”>Email Jon&lt/a>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Difference between attribute, attribute name and value?

A

href=”website”
href is attribute name
website is value
whole thing is attribute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Open up a link in a new window

A

target=”_blank” attribute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

link to another part of a page

A

create an id with the id attribute (within any element tag)
id=”prologue”

then link to it with an href attribute in an anchor tag and a number sign within the value
href=”#prologue”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

link to another part of a specific or different page

A

forward slash number sign id name
&lta href=”http:/www.
htmlandcssbookcom/
#bottom”>

17
Q

What does the &ltlink> tag do?

A

&ltlink rel=”stylesheet” href=”styles.css”>

defines the relationship between the current document and an external resource.

Usually CSS style sheets or favicons (icons that show in tab)

Here are some rel tags:
alternate
appendix
bookmark
chapter
contents
copyright
glossary
help
home
index
next
prev
section
start
stylesheet
subsection
18
Q

What is the root directory (href=”"):

  1. when opening an HTML file on computer
  2. website
  3. live server
A
  1. the base drive folder
  2. the root directory on the website
  3. the directory set by live server