html and css basics Flashcards

1
Q

when creating a new file, why does it have to end with a .html or .css? e.g website.html

A

This tells the computer, this file contains html code rather than text

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

how do you create a button?

A

<button></button>

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

what is a html element?

A

An HTML element is defined by a start tag, some content, and an end tag.

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

what is syntax?

A

The rules that govern the structure of the symbols, words, and punctuation found in programming languages.

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

what is an anchor element and what is the code to create a link to a website?

A

an anchor element link to another website. <a>link to youtube</a>

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

what is a html attribute and give an example?

A

html attribute = modifies how an element behaves, e.g href- is the attribute name “” is the attribute value. The attribute name tells us what we are modifying and the value tells us we are modifying it to.

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

how many attributes can you have on an element?

A

you can have multiple attributes.

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

when creating a link what attribute do you need to make it in a new tab.

A

target=”_blank”

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

give an example of multiple attributes in 1 anchor element

A

<a>link to youtube</a>

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

what element do you need to write css?

A

<style></style>

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

what is a css selector? give an example

A

css selector= which elements we’re targeting.
button {
}

Targeting all button on the page.

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

what is a css property and a css value? give an e.g

A

css property = it tells the computer what we are changing,
css value = what we are changing the property to

button{
background-color: red;
}
background color is the css property because it tell the computer we are going to change the background colour.
red is the css value because we are changing the background colour to red.

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

create a button (the button has to say subscribe) with the css property and value listed below:
background colour - red
text colour - white
border - none
height - 36px
width - 105px
rounded corners on the border
change the cursor to a pointer

A

<style>

button {
background-colour: red;
color: white;
border: none;
height: 36px; 
width: 105px;
border-radius: 2px;
cursor: pointer;
}
</style>

<button>SUBSCRIBE</button>

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

what is rbg and what does it stand for?

A

RGB (red, green and blue) refers to a system representing the colors used on a digital display screen.

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

what is a class attribute and what does it do and give an example.

A

class attribute, class=””

<style>

.subscribe-button {                                  
background-colour: red;
color: white;
border: none;
height: 36px; 
width: 105px;
border-radius: 2px;
cursor: pointer;
}
</style>

<button>SUBSCRIBE</button>

This means all the css code will only apply to the subscribe button not anything else.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
  1. what is the hover effect and what is the code for it?
  2. what is the code to change the effect when you click on the button?
A
  1. The hover effect is when ever you hover over a button/shapes.
    e.g
    .subscribe-button:hover {
    }
  2. .subscribe-button:active {
    }
17
Q

what is the code for transparency?

A

opacity: 1; the number changes from 1 to 0. The closer to 0 the more transparent it become

18
Q

what is the code for shadows?

A

box-shadows: ;
e.g
.tweet-button:hover {
box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.15);
}