HTML Flashcards
Where do you put non-visible content about the HTML document?
Inside the head tags.
Where do you put visible content about the HTML document?
Inside the body tags.
Where do the head and body tags go in a valid HTML document?
Inside the html tags.
What is the purpose of a !DOCTYPE declaration?
To tell the browser what version of HTML the page is using.
Give five examples of HTML element tags.
head, title, body, h1, p tags
What is the purpose of HTML attributes?
To provide additional information for the content of an element.
Give an example of an HTML entity (escape character).
& sign, copyright sign
How do block-level elements affect the document flow?
They create a new line.
How do inline elements affect the document flow?
They appear on the same line as their neighboring elements.
What are the default width and height of a block-level element?
A Block-level element occupies the entire horizontal space of its parent element (container), and vertical space equal to the height of its contents.
What are the default width and height of an inline element?
An inline element does not start on a new line and only takes up as much width as necessary.
What is the difference between an ordered list and an unordered list in HTML?
The items in the ordered list begin with a number.
The items in the unordered list begin with a bullet point.
Is an HTML list a block element or an inline element?
Block element.
What HTML tag is used to link to another website?
“<a>” anchor tag.</a>
What is an absolute URL?
A full web address for another site.
What is a relative URL?
A path linking to another page in the same site.
How do you indicate the relative link to a parent directory?
Use ../
How do you indicate the relative link to a child directory?
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?
../../and the file name
How do you indicate the relative link to the same directory?
just use the file name and ./??
What is the purpose of an HTML form element?
An HTML form is to collect information from users, allow users to search or perform other functions online.
Give five examples of form control elements.
input, textarea, select, button, label
Give three examples of type attributes for HTML elements.
text, submit, radio,
Is an HTML element a block element or an inline element?
Inline.
What are the six primary HTML elements for creating tables?
table, tr, th, td, thead, tbody, tfoot
What purpose do the thead and tbody elements serve?
separate the table content to heading and body, allows you to style them differently and also it helps people who use screen reader.
Give two examples of data that would lend itself well to being displayed in a table.
TV schedule, bank statement
What are the names of the individual pieces of a CSS rule?
selector (selector group)and declaration block
In CSS, how do you select elements by their class attribute?
a dot follow by the value of the class attribute
In CSS, how do you select elements by their type?
just type the element name
In CSS, how do you select an element by its id attribute?
a # pound sign followed by the value of the id attribute
Name three different types of values you can use to specify colors in CSS.
Color names, RGB values, and Hex codes. (also HSL values)
What is a pseudo-class?
A CSS pseudo-class is a keyword added to a selector which allows you to apply a style to the element when a user interacts with it.
What are CSS pseudo-classes useful for?
Links, buttons, form controls.
What CSS properties make up the box model?
Margin, border and padding.
Which CSS property pushes boxes away from each other?
Margin.
Which CSS property add space between a box’s content and its border?
Padding.