HTML Flashcards
Where do the head and tags go in a valid HTML document?
The head and body tags are children of the HTML element and siblings of each other
What is the purpose of a declaration?
Instructs the browser what version of HTML is written in
Give five examples of HTML element types.
h1 header p image div
What is the purpose of HTML attributes?
HTML attributes provide additional information about HTML elements
Give an example of an HTML entity (escape character).
® registered trademark
© copyright symbol
greater than symbol
How do block-level elements affect the document flow?
Some elements will always appear to start on a new line in the browser window. These are known as block level elements.Examples of block elements are <h1>, </h1><p>, </p><ul>, and <li>.</li></ul>
How do inline elements affect the document flow?
Some elements will always appear to continue on the same line as their neighboring elements. These are known as inline elements. Examples of inline elements are <a>, <b>, <em>, and <img></img>.</em></b></a>
What are the default width and height of a block-level element?
By default, the height of a block element is the height of the content, and the width is the length of the page
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.Width and height are both auto.
What is the difference between an ordered list and an unordered list in HTML?
Ordered lists are lists where each item in the list is numbered. For example, the list might be a set of steps for a recipe that must be performed in order, or a legal contract where each point needs to be identified by a section number.
Unordered lists are lists that begin with a bullet point (rather than characters that indicate order).
Is an HTML list a block element or an inline element?
Block elements
What HTML tag is used to link to another website?
a href=”http://www.imdb.com”>IMDB
What is an absolute URL?
full web address for the site includes domain
What is a relative URL?
A relative URL is a URL that only includes the path (or everything that comes after the domain
How do you indicate the relative link to a parent directory?
../
How do you indicate the relative link to a child directory?
Child directory/(where to look)
How do you indicate the relative link to a grand parent directory?
../../(where to look)
Read: < a href= “about-me/about-me.html” > About Me
opening tag for a element There is an href attribute with a value of a relative url pointing to the about-me.html file within the about-me directory with some text content and then a closing tag for the a element
Read:<a>home page</a><a></a>
Ex. there is an href attribute with a value of a relative url pointing to the index.html file within the parent directory
What is the purpose of an HTML form element?
The HTML element represents a document section containing interactive controls for submitting information
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.
form fieldset legend textarea label button input
Give three examples of type attribute values for HTML elements.
The common input types button, checkbox, file, hidden, image, password, radio, reset, submit, and text.
Is an HTML element a block element or an inline element?
Inline Element
What are the six primary HTML elements for creating tables?
table tr td th thead tbody
What purpose do the thead and tbody elements serve?
help distinguish between the
main content of the table and the first and last rows
Give two examples of data that would lend itself well to being displayed in a table.
Examples of tables include financial reports, TV schedules, and sports results.
What are the names of the individual pieces of a CSS rule?
Declaration block(curly braces {}) & selector{property:value}
In CSS, how do you select an element by its id attribute?
id value
Name three different types of values you can use to specify colors in CSS.
RGB
Hex codes
color names