comp2- HTML and CSS Flashcards Preview

AS COMPUTING > comp2- HTML and CSS > Flashcards

Flashcards in comp2- HTML and CSS Deck (47)
Loading flashcards...
1
Q

what is the basic structure of a webpage?

note ) = > and (=

A
(!doctype html)
(html)
  (head)
          (title)    (/title)
  (/head)
   (body)   
           content of web page  
  (/body)
(/html)
2
Q

whats is a meta tag and whats it used for?

A

(meta) provides meta data about a HTML document that isnt visible. can be page descriptions, authors, keywords which is used by a search engine to classify a page.

3
Q

what does the (div> (/div> block-level tag do?

A

divides the page into sections

4
Q

what does the (p> (/p> block-level tag do?

A

creates a paragraph( puts a empty line before and afterwards)

5
Q

what does the (ol> (/ol> block-level tag do?

A

creates a ordered list with numbers.

6
Q

what does the (ul> (/ul> block-level tag do?

A

creates a unordered list with bullet points

7
Q

what does the (li> (/li> block-level tag do?

A

encloses each list item in a list.

8
Q

what does the (h#>(/h#> block-level tag do?

A

creates a heading 1-6 with heading 1 being the biggest

9
Q

what does the (hr> block-level tag do?

A

creates a horizontal line

10
Q

what does the (span> (/span> inline tag do?

A

allows grouping of inline elements

eg (p>My mother has (span style=”color: blue;”>blue(/span> eyes.(/p>

11
Q

what does the (strong> (/strong> inline tag do?

A

makes the enclosed text strong (bold)

12
Q

what does the (em> (/em> inline tag do?

A

makes the enclosed text emphasized (italics)

13
Q

what does the (br> inline tag do?

A

makes text afterwards go on a new line

14
Q

what does the (a> (/a> inline tag do?

And a example to google saying click here

A

used in html links

(a href=”google.co.uk”> click here (/a>

15
Q

what does the (img/> inline tag do?

and a general example

A

opens a image
(img src=”filesource” alt=”alttext” width=”” height=””/>
alt is the text displayed when you hover over it and used in text only browsers.

16
Q

how do you write comments in html?

note ) = > and (=

A
(!--comment--)
which can be conditional eg 
(!--[if IE 8})
some html
(![endif]--)
17
Q

What does HTML stand for?

A

Hypertext markup Language

18
Q

what does CSS stand for?

A

cascading style sheets

19
Q

What does HTML do?

A

HTML is used for the content of the webpage and tags that do structure.

20
Q

What does CSS do?

A

Controls the style of the webpage. Layout can also be controlled
is used to format and present the content of web pages

21
Q

What are the two kinds of style sheet in css

A

embedded (internal) and external

22
Q

What three parts make up a style rule in CSS?

A

a selector, property and a value.

selector{property:value; property2:value} the selector selects which elements of HTML are effected by the rule.

23
Q

What are the three kinds of selector used in CSS style rules?

A

type- used inhead and external sheets type=”text/css”type selectors are also any html tag eg p{color:red;}
class-Used as much as u like .classname{property:value;}
ID- only used once written as #idname{property:value;}

24
Q

Whats the property for changing the page colour?

A

backgroud-color

eg body{background-color:red;}

25
Q

Whats the property for changing colour?

A

color

eg p{color:red;}

26
Q

Whats the property for aligning text?

A

text-align

eg p{text-align:center;}

27
Q

Whats the property for changing font?

A

font-family

eg p{font-family:Arial;} (if name id more then one word its in “ “)

28
Q

Whats the property for changing text size?

A

font-size

eg h1{font-size:40px;}

29
Q

Whats the property for changing text to italic?

A

font-style

(div style=”font-style: italic;”> (/div>

30
Q

Whats the property for changing to bold ?

A

font-weight

p { font-weight: bold;}

31
Q

How do inline style sheets look.

make a part of a line red.

A

(p>…..(span style=”color: red;”> red text (/span> ….(/p>

32
Q

How do inhead style sheets look.
make all div in italics.
note ) = > and (=

A
(head)
(style type="text/css"/)
 div { font-style:italic; }
(/style)
(/head)
33
Q
use a class selector called 'thick' that makes text bold.
note ) = > and (=
A
(head)
(style type="text/css"/)
 .thick { font-weight:bold }
(/style)
(/head)
(body)
 <div class="thick"> THIS IS BOLD </div>
(/body)
34
Q

use a id selector called ‘twentytwo’ that makes text 22 pixels big.
note ) = > and (=

A
(head)
(style type="text/css"/)
#twentytwo { font-size: 22px; } 
(/style)
(/head)
(body)
 <div> THIS IS 22 PX  </div>
(/body)
35
Q

What are the benefits of using an external style sheet?

A

ensure the same styles are applied to each HTML page of a website. Any changes made are added to all the pages

36
Q

How do you use an external style sheet?

note ) = > and (=

A

(head)
(link rel=”stylesheet” type=”text/css” href”mystyles.css” /)
(/head)

37
Q

What does an external style sheet look like?

A

a list of class, id and type selectors , saved as a .css

38
Q

which selectors override the others?

A
ID overrides all
class overrides type
type doesnt override
39
Q

Rule of thirds layout rule?

A

split the webpage into 3 vertically and horizontally and fit elements into these sections.

40
Q

why use <strong> and <em> over <b> and <i> ?</i></b></em></strong>

A

its allows the browser to decide their own treatment of the tag, eg a aural browser will pronounce the words louder for

41
Q

The three colour schemes for web pages?

A

monochromatic, Analogous, complementary

42
Q

What is a monochromatic colour scheme?

A

Uses a single base colour and any number of tints/shades of that colour.

43
Q

What is a Analogous colour scheme?

A

use any three colours that are side by side on a 12-part colour wheel.eg yellow-green. usually one of the colours is predominant

44
Q

What is a complementary colour scheme?

A

use colours that are located opposite each other on the colour wheel. eg green and red.

45
Q

which tags follow american spelling?

A

color and center

46
Q

what case are tags in?

A

lowercase

47
Q

How do you make a table?

A
(table style="width:100%; border:2">
  (th> table heading   (/th>
      (tr> table row
        (td> table data (/td>
      (/tr>
  (/table>