HTML & CSS- part 1 Flashcards
What is the syntax of an HTML element?
What is a tag’s relationship to an element?
A tag is a part of an element.
How do you note an html page?
Text enclosed by these (but without spaces):
< ! - -
- - >
isn’t readable by the browser. It’s just for human readers.
What’s the file name extension for an html document?
.html
What’s the file name extension for a CSS document?
.css
Which kind of HTML page might not have its file name visible in the browser address bar?
index
What goes before “www” in a web address?
http://
How many HEADING sizes are there? Which is the largest?
*Six heading sizes.
*The largest is <h1>
What’s the second tag for <br>?
There isn’t one.
Is there a space between <br> and the text it affects?
No.
Where does the browser break the line in a <p>?
*Wherever it wants
*If you want the browser to break the heading a certain way, you have to tell it to do so explicitly, using the tag < br >
What’s the difference in row-skipping:
<p> < br >?
<p> breaks the line and skips a row
<br> just breaks a line. Does not skip a row.
Are CSS files and HTML files stored in the same folder?
You could put the CSS file in the same folder as your HTML file if you wanted to, but most developers don’t.
What’s the code to specify which font you want for a paragraph?
In a font stack, why do you write Georgia without quotes but “Times New Roman” with quotes?
Because “Times New Roman” has a space. If a font name has a space, you must put quotes around it?
What is always the last item in a font stack (besides the curly brace)?
The generic font descriptor, like serif or sans serif
In a font stack, why do you list more than one font?
*Fallback fonts are necessary because the browser grabs the fonts for the webpage from the user’s computer.
*With a font stack, the browser will move to your 2nd choice if the first isn’t available.
How many fallback fonts should you list?
You can list as many as you want, but usually it’s three or four.
What’s the first line of a code to style a paragraph? The last line?
First line is (note the space): p {
Last line is: }