HTML, CSS and Javascript Flashcards
What does HTML stand for?
HyperText Markup Language
What does CSS stand for?
Cascading Style Sheets.
How would a paragraph with the text “Hello World” be shown in HTML?
[p] Hello World [/p] ([] = <>)
What is the tag that shows code should be interpreted as HTML?
[html] ([] = <>)
What tag contains the main page content?
[body] ([] = <>)
Which tag defines the tab or window heading area?
[head] ([] = <>)
What tag defines the text in the tab or window heading area?
[title] ([] = <>)
What tags are used to show headers?
[h1],[h2],[h3] ([] = <>)
What tag is used to make paragraphs?
[p][/p] ([] = <>)
Which tag is used to make images?
[img src = FileLocation, height = x, width = y] (self closing) ([] = <>)
How would you link the text “Hello World” to google
[a href=”https://www.google.co.uk”] Hello World[/a] ([] = <>)
How would you write an ordered / unordered list?
[ol] (or [ul] for unordered)
[li] bullet one [/li]
[/ol] ([] = <>)
How do you use and what if the function of a div tag?
[div] content [/div] ([] = <>)
Used to divide page into separate containers, can be styled specifically in css.
Why is CSS used?
Used to describe layout, colours, sizes etc of web pages, means styles can be used throughout whole sites.
What is internal CSS and how do you use it?
When the CSS file is placed directly in the html file: [style type="text/css"] h1{ color:blue; } [/style] ([] = <>)
What is embedded CSS and how do you use it?
When a link is made to a CSS document:
[link rel=”stylesheet” type=”text/css” href=”mystyle.css”]
([] = <>)
What is inline CSS and why and how would you use it?
When CSS is used directly in the item it affects:
[h1 style=”color:blue;”]This is a heading[/h1]
([] = <>)
This is often used for one off style adjustments that don’t need storing in the main CSS file.
What is an identifier and how do you use one?
A method to give an object a predefined style, can only be used once per page: #header { padding: 5px; }
What is a class and how do you use one?
A method to give an object a predefined style: .list { color: #ffffff; }
What is the difference between an identifier and a class?
An identifier can only be used once.
How would you change the background colour of all div’s to blue?
div{
background-color: blue;
}
How do you create a web-form with an input box called name and submit button with HTML?
[form]
[input type=”text”, name=”name”/]
[input type=”submit”, value=”submit”/]
[/form] ([] = <>)
How can JavaScript be used to create an alert box?
alert(“Hello World”);
How can JavaScript write directly to a document?
document.write(“Hello World”);
How can a text box with the ID “test” have its text changed to “Hello World”?
Either:
document.getElementById(“test”).innerHTML=’Hello World’;
Or:
chosenElement = document.getElementById(“test”);
chosenElement.innerHTML=”Hello World”);
How would you use a script tag?
[script type=”text/javascript”>
“Code here…”
[/script] ([] = <>)