HTML Flashcards
Where do you put non-visible content about the HTML document?
Inside the head element
where do you put visible content about the HTML document?
Inside the < body > element
Where do the < head > and < body > tags go in a valid HTML document?
Inside the < html > element
What is the purpose of the < !DOCTYPE > declaration?
The < !DOCTYPE > declaration is the instruction to the web browser about what version of HTML the page is written in.
Give five examples of HTML element types.
- < html >
- < body >
- < title >
- < p >
- < h1 >
What is the purpose of HTML attributes?
Attributes provide additional information about the contents of the element. They appear on the opening tag of the element and are made up of two parts: a name and a value, separated by an equals sign.
Give an example of an HTML entity (escape character).
Ampersand(&) ==> & amp
How do block-level elements affect the document flow?
A Block-level element occupies the entire horizontal space of its parent element (container), and vertical space equal to the height of its contents, thereby creating a “block”.
How do inline elements affect the document flow?
By default, inline elements do not force a new line to begin in the document flow.
What are the default width and height of a block-level element?
By default, a block-level element expands to a width of 100% of its parent container. The height is set to the default auto.
What are the default width and height of an inline element?
The height of an inline element is the height of the content. The width of an inline element is the width of the content. Both height and width are set to auto.
How do you indicate the relative link to a parent directory?
Use ../ to indicate the folder above the current one, then follow it with the file name.
How do you indicate the relative link to a child directory?
For a child folder, use the name of the child folder, followed by a forward slash, then the file name.
How do you indicate the relative link to a grand parent directory?
Repeat the ../ to indicate that you want to go up two folders (rather than one), then follow it with the file name.
Ex. ../../index.html
How do you indicate the relative link to the same directory?
To link to a file in the same folder, just use the file name. (nothing else is needed.)