HTML & CSS Flashcards
What is HTML?
Hypertext Markup Language, a standardized system for tagging text files to achieve font, colour, graphic, and hyperlink effects on World Wide Web pages.
How old is HTML?
It was first developed by Tim Berners-Lee in 1990
What does an .html file need to contain, in order to be valid?
It needs to contain and
Name 5 different html elements:
Image, heading, table, link
What does <a> do?</a>
Anchor - used in to make a hyperlink
What attribute does <a> need to have?</a>
<a> needs to have a link associated with it</a>
What elements can a contain?
It allows authors to arrange data – text, preformatted text, images, links, forms, form fields, other tables, etc. – into rows and columns of cells.
How do you tell an image how wide and high it should be?
Using width=”” and height=””
How can you give an element a class?
Eg. img src=”example.png” width=”400” height=”400” class=”onetwothree”
What is CSS?
Cascading Style Sheets is a style sheet language used for describing the presentation of a document written in a markup language like HTML.
How do you include a .css file inside your .html file?
In the same folder as the .html file, put the style.css file, and in the .html file, say:
How can you tell an element to have a color for it’s background?
In style.css,
.example{
background-color: rgb(200,300,200);
}
How do you select an element based on it’s class?
Put “.” + “name of class”
What would the css selectors for all images look like?
.img{ //something }
What would the css selectors for anchors with a class of “special” look like?
.special{ //something }