comp2- HTML and CSS Flashcards
what is the basic structure of a webpage?
note ) = > and (=
(!doctype html) (html) (head) (title) (/title) (/head) (body) content of web page (/body) (/html)
whats is a meta tag and whats it used for?
(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.
what does the (div> (/div> block-level tag do?
divides the page into sections
what does the (p> (/p> block-level tag do?
creates a paragraph( puts a empty line before and afterwards)
what does the (ol> (/ol> block-level tag do?
creates a ordered list with numbers.
what does the (ul> (/ul> block-level tag do?
creates a unordered list with bullet points
what does the (li> (/li> block-level tag do?
encloses each list item in a list.
what does the (h#>(/h#> block-level tag do?
creates a heading 1-6 with heading 1 being the biggest
what does the (hr> block-level tag do?
creates a horizontal line
what does the (span> (/span> inline tag do?
allows grouping of inline elements
eg (p>My mother has (span style=”color: blue;”>blue(/span> eyes.(/p>
what does the (strong> (/strong> inline tag do?
makes the enclosed text strong (bold)
what does the (em> (/em> inline tag do?
makes the enclosed text emphasized (italics)
what does the (br> inline tag do?
makes text afterwards go on a new line
what does the (a> (/a> inline tag do?
And a example to google saying click here
used in html links
(a href=”google.co.uk”> click here (/a>
what does the (img/> inline tag do?
and a general example
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.
how do you write comments in html?
note ) = > and (=
(!--comment--) which can be conditional eg (!--[if IE 8}) some html (![endif]--)
What does HTML stand for?
Hypertext markup Language
what does CSS stand for?
cascading style sheets
What does HTML do?
HTML is used for the content of the webpage and tags that do structure.
What does CSS do?
Controls the style of the webpage. Layout can also be controlled
is used to format and present the content of web pages
What are the two kinds of style sheet in css
embedded (internal) and external
What three parts make up a style rule in CSS?
a selector, property and a value.
selector{property:value; property2:value} the selector selects which elements of HTML are effected by the rule.
What are the three kinds of selector used in CSS style rules?
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;}
Whats the property for changing the page colour?
backgroud-color
eg body{background-color:red;}