HTML & CSS Flashcards

1
Q

What is HTML?

A

Hypertext Markup Language, a standardized system for tagging text files to achieve font, colour, graphic, and hyperlink effects on World Wide Web pages.

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

How old is HTML?

A

It was first developed by Tim Berners-Lee in 1990

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

What does an .html file need to contain, in order to be valid?

A

It needs to contain and

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

Name 5 different html elements:

A

Image, heading, table, link

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

What does <a> do?</a>

A

Anchor - used in to make a hyperlink

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

What attribute does <a> need to have?</a>

A

<a> needs to have a link associated with it</a>

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

What elements can a contain?

A

It allows authors to arrange data – text, preformatted text, images, links, forms, form fields, other tables, etc. – into rows and columns of cells.

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

How do you tell an image how wide and high it should be?

A

Using width=”” and height=””

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

How can you give an element a class?

A

Eg. img src=”example.png” width=”400” height=”400” class=”onetwothree”

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

What is CSS?

A

Cascading Style Sheets is a style sheet language used for describing the presentation of a document written in a markup language like HTML.

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

How do you include a .css file inside your .html file?

A

In the same folder as the .html file, put the style.css file, and in the .html file, say:

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

How can you tell an element to have a color for it’s background?

A

In style.css,

.example{
background-color: rgb(200,300,200);
}

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

How do you select an element based on it’s class?

A

Put “.” + “name of class”

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

What would the css selectors for all images look like?

A
.img{
//something
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What would the css selectors for anchors with a class of “special” look like?

A
.special{
//something
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What would the css selectors for all anchors inside paragraphs that have a class of ‘special’ look like?

A
p::special{
//something
}
17
Q

What would the css selectors for all button with a class of ‘special’, while you’re hovering over them look like?

A
b::special::hover{
//something
}
18
Q

How would you center an element vertically and horizontally?

A

Use margin:auto