HTML/CSS/JS Flashcards
What tag is always used at the start?
html
What tag is used for external css files?
link (single tag)
(rel=”stylesheet”) and href=
What are the 2 tags used for the overall page structure?
head and body
What tag is used for the opening text?
title
What tags are used for headings?
h1 largest
h2
h3 etc.
What tag is used for pictures?
img (self closing)
src=
alt=
height=
width=
What tag is used for hyperlinks?
a
href=
What tag is used to link to js files?
script src=
or embedded js without src
What tag is used to create containers?
div
What tag for surveys?
form
What tag for search boxes and buttons?
input (self closing)
type = “text” or “submit”
What tag for paragraphs?
p
What tag for each point in a list?
li
What tag for bullet points?
ul
What tag for numbered list?
ol
How do you do css directly in html elements?
<element>
(style attribute used like any other attribute but with semicolon and css syntax inside "")
</element>
How do you select a class in css?
.classname {}
How do you select an ID in css?
idname {}
How do you style in css? (general syntax)
element {
property: value;
}
What property is used for background colours?
background-color
What property is used for border colours?
border-color
What property is used for dotted or lined etc borders?
border-style
What property is used for border size?
border-width
What property is used for text color?
color
What property is used for font?
font-family
What property is used for text size?
font-size
What properties are used for dimensions?
height,width
What values can border style take?
dotted
dashed
solid
double
none
How do you write to a web page in JS?
document.write(“text”);
How do you do an alert box in JS?
alert(“text”);
How do you change the contents of an element in JS?
elementvar = document.getElementById(“example”);
elementvar.innerHTML = “newtext”;