HTML & CSS Flashcards
Where does non-visible content about the HTML document go?
It is contained in the <head> element.
Where do you put visible content about the HTML document?
It goes within the <body> element.
Where do the <head> and <body> tags go in a valid HTML document?
They go within the <html> document with the <head> appearing before the <body>.
What is the purpose of a <!DOCTYPE> declaration?
Is to inform the browser of what type of file is coming in. Also with older versions of HTML the version of HTML is declared. In HTML 5 <!DOCTYPE html> is all that is needed.
Give five examples of HTML element types.
<header>, <h1>, <form>, <p>, <input></input>
</p></form></h1></header>
What is the purpose of HTML attributes?
HTML attributes are are their to give more information about a particular element, whether to change functionality or for styling purposes.
Give an example of an HTML entity (escape character).
The copyright symbol and registered trademark symbol. Written like so i.e. ©
How do block-level elements affect the document flow?
They take up the whole width of the page and as much height as needed by the content.
How do inline elements affect the document flow?
They only take up the amount of space as their content requires.
What is the difference between an ordered list and an unordered list in HTML?
An ordered list, is for things that must be in order and will be labeled 1,2,3 etc. And unordered lists items do not need to be ordered in a particular way and have simple bullet points.
Is an HTML list a block element or an inline element?
<li> elements are block elements and each one will appear on a new line.
</li>
What HTML tag is used to link to another website?
The <a> tag with an href=”” attribute is used to link to another website.</a>
What is an absolute URL?
An absolute URL is a link to a page outside of the current pages file system.
What is a relative URL?
A relative URL will direct the page withing the current file system.
How do you indicate the relative link to a parent directory?
You can use ../ to move “up” one directory.
How do you indicate the relative link to a child directory?
“directory-name/-file-name” will indicate the chile directory to enter for the next file or a grandchild directory.
How do you indicate the relative link to a grand parent directory?
../../ and you add another ../ for every directory up.
How do you indicate the relative link to the same directory?
You just need the file name. eg, href=”index.html”
What is the purpose of an HTML form element?
The purpose is to gather or submit a information request from the server.
Give five examples of form control elements.
input, label, button, text-area, text
Give three examples of type attribute values for HTML <input></input> elements.
radio, checkbox, email
What is a pseudo-class?
A pseudo class, is a keyword added to a selector mainly used for interactivity.
What are CSS pseudo-classes useful for?
Allows you to add styling based on the interactivity being selected.