HTML Flashcards
Where do you put non-visible content about the HTML document?
within the head element
Where do you put visible content about the HTML document?
within the body element
Where do the head and body tags go in a valid HTML document?
head tags goes between html and body tags. body tags goes between closing head and closing html tags
What is the purpose of a !doctype declaration?
The DOCTYPE declaration is an instruction to the web browser about what version of HTML the page is written in. This ensures that the web page is parsed the same way by different web browsers.
Give five examples of HTML element tags.
div, a, img, link, p
What is the purpose of HTML attributes?
Attributes provide additional information about elements
Give an example of an HTML entity (escape character).
¢–cent–¢
How do block-level elements affect the document flow?
A block-level element always starts on a new line.
How do inline elements affect the document flow?
An inline element does not start on a new line.
What are the default width and height of a block-level element?
A block-level element always takes up the full width available (stretches out to the left and right as far as it can). the height is auto
What are the default width and height of an inline element?
An inline element only takes up as much width as necessary.(auto) the height is also auto
What is the difference between an ordered list and an unordered list in HTML?
The unordered list items have no orders and will be marked with bullets (small black circles) by default. the ordered list items are displayed by order and will be marked with numbers by default
Is an HTML list a block element or an inline element?
block element
What HTML tag is used to link to another website?
anchor (a) tag
What is an absolute URL?
a full web address
What is a relative URL?
a local link, which is to a page within the same website
How do you indicate the relative link to a parent directory?
use ../ to indicate the directory 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 directory, use the name of the child directory, followed by /, then the file name
How do you indicate the relative link to a grand parent directory?
repeat the ../ to indicate that we want to go up two directories, then follow it with the file name
How do you indicate the relative link to the same directory?
just use the file name
What is the purpose of an HTML form element?
An HTML form is used to collect user input. The user input is most often sent to a server for processing.
Give five examples of form control elements.
input, select, textarea, button,option
Give three examples of type attributes for HTML (input) elements.
text, password, email
Is an HTML (input) element a block element or an inline element?
inline
What are the six primary HTML elements for creating tables
table, thead, tbody, tr, td, th
What purpose do the thead and tbody elements serve?
thead is to groups the header content in a table;
tbody is to groups the body content in a table
Give two examples of data that would lend itself well to being displayed in a table.
accounting info, tabular data
What are the names of the individual pieces of a CSS rule?
selector, declaration block, property and value
In CSS, how do you select elements by their class attribute?
with the . followed by class name