Chapter2 Flashcards

1
Q

how to make a hyperlink in html?

A

the ““a”” element is used to create a link to another page. “bra”a”bra”elexirs”bra”/a”bra”
the content of the ““a”” element is the link text. In the browser the link text appears with an underline to indicate that you click it.
the href attribute is how you specify destination of the link.
““a href=”elexir.html”"”elexirs”“/a””

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

What are attributes?

A

attributes give you a way to specify additional information about an element. With no attributes all we can supply is a descriptive name ,but with attributes we can customize the element with all kind of information.

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

Can I make an attribute myself?

A

Web browsers only know about a predefined set of attributes for each element. If you just made up attributes the browser wouldn’t know what to do with them. When a browser recognizes an element or an attribute we like to say that it “supports” that element or attribute. You should only use attributes that you know are supported.
That said, for programming web applications (the subject of Head First HTML5 Programming), HTML5 now supports custom data attributes that allow you to make up a custom name for new attributes.

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

what is href abbreviated for?

A

hyper text refrence

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

how to make an image a hyper link?

A

if you put an ““img”” element between the ““a”” tags, then your image will be clickable just like text.

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

Can I put any thing between the ““a”” tags and it will be clickable? Like say a paragraph?

A

You can indeed put a ““p”” element inside an ““a”” element to link an entire paragraph. You will mostly be using text and image (or both) within the ““a”” tag. but if you need to link a p or h1 tag you can.

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

What are the characteristics of a good organization system?

A

It must be flexible enough to grow, while keeping things as simple as you can.

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

Why not put an image folder in each folder, like “about” and “beverages”?

A

We could have. We expect some of the images will be reused among several pages, so we put images in a folder at the root (the top level) to keep them all together. If you have a site that needs lots of images in different parts of the site, you might want each branch to have its own image folder.

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

What is branch?

A

You can understand the way folders are described by looking at them as upside down trees. At the top is the root and each path down to a file or folder is a branch.

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

How to make a relative path?

A

you start from the page that has the link, and then you trace a path through your folders until you find the file you need to point to. First you identify the source folder, then you identify the destination folder, then you identify the path from source to destination.

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

How to go up one folder in relative path?

A

with ..

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

what do you do if you need to go up two folders instead of just one?

A

you can use “..” for each parent folder you want to go up. Each time you use “..” you’re going up by one parent folder. So if you want to go up two folders, you’d type “../..”. You still have to separate each file with the “/” so don’t forget to do that.

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

My operating system uses “"as a separator; shouldn’t I be using that instead of “/”?

A

No; in web pages you always use “/” (forward slash). Don’t use “" (backslash). Various operating systems use different file separators (for instance windows uses “" instead of “/”) but when it comes to the web, we pick a common separator and all stick to it. So whether you’re using Mac, Windows, Linux or something else, always use “/” in the paths in your HTML.

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

What is a relative path?

A

A relative path is a link that points to other files in your website relative to the webpage you are linking from. Just like on a map the destination is relative to the starting point.

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

is it allowed to use space for folder and file names?

A

NO! Don’t use space in the names you choose for files and folders for your website.

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

How you should organize your website?

A

It’s a good idea to organize your website early on in the process of building your site, so you don’t have to change a bunch of paths later when the website grows. There are many ways to organize a website, how you do it is up to you.