HTML Flashcards

1
Q

Surrounds all HTML code?

A

< html > < / html >

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

Two sections of HTML?

A

< head> < /head>< body> < /body>

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

Headers

A

< h1>

< h2> etc.

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

paragraphs

A

< p> < /p>

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

line break

A

< br>

This does not have a close bracket thing

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

link to another page

A

<a>Text that you can click on</a>

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

image (with attributes)

A

< img src=”imgName.jpg”>< img src=”imgName.jpg” height = “300px” width = “200px” alt = “Picture” >

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

Add style WITHOUT css link

A

< p style=”color:red;font-size:60px;”>This is a red paragraph.< /p>

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

Add CSS within HTML page, ie not an external link

A
< style>
body {background-color: powderblue;}
h1   {color: blue;}
p    {color: red;}
< /style>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Add CSS link

A

< link rel=”stylesheet” href=”styles.css”>

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

CSS code

A
h1 {
  color: blue;
  font-family: verdana;
  font-size: 300%;
}
p {
  color: red;
  font-family: courier;
  font-size: 160%;
}
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

table

A
< table>
  < tr>
    < th>Band name< /th>
    < th>Toy< /th>
    < th>Name< /th>
  < /tr>
  < tr>
    < td>Weezer< /td>
    < td>XBOX 360< /td>
    < td>Alejandro< /td>

< tr>
< td>ABBA< /td>
< td>Balls< /td>
< td>Frederick< /td>< /tr>< /table>

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

unordered list

A

< ul>
< li>Coffee< /li>
< li>Tea< /li>
< li>Milk< /li>< /ul>

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

ordered list

A

< ol>
< li>Poffee< /li>
< li>Pea< /li>
< li>Pilk< /li>< /ol>

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

class attributes

A
.city {
  background-color: tomato;
  color: white;
  border: 2px solid black;
  margin: 20px;
  padding: 20px;
}

Style of class determined in CSS, shown with the full stop

< div class=”city”>
< h2>London< /h2>
< p>London is the capital of England.< /p>< /div>

< div class=”city”>
< h2>Paris< /h2>
< p>Paris is the capital of France.< /p>< /div>

classes can be used multiple times

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

ID attribute

A
#myHeader {
  background-color: lightblue;
  color: black;
  padding: 40px;
  text-align: center;
}

style defined in CSS using #

< h1>My Header< /h1>

ID is unique to one element, cannot be reused.

17
Q

import javascript file

A

< script src=”js/myscript.js”>< /script>

18
Q

javascript change words

A

< script>
document.getElementById(“demo”).innerHTML = “Hello JavaScript!”;
< /script>

this is conttained within the html code, as opposed to an imported javascript file

19
Q

javascript change style

A

document. getElementById(“demo”).style.fontSize = “25px”;
document. getElementById(“demo”).style.color = “red”;
document. getElementById(“demo”).style.backgroundColor = “yellow”;

20
Q

javascript change image source attribute

A

document.getElementById(“image”).src = “picture.gif”;