HTML Flashcards
Where do you put non-visible content about the HTML document?
You would put inside the head tag element at the beginning, after the html doc type element.
Where do you put visible content about the HTML document?
In between element
Where do the and tags go in a valid HTML document?
Both child elements of HTML
Head - contains info about the page. Rather than info that is shown the main part of the browser window,
Body - everything inside this element is shown within the main browser window.
Head and Body are siblings
What is the purpose of a declaration?
To tell a browser which version of html this page is using
Can also help in rendering a page correctly
Give five examples of HTML element types.
<img></img>
What is the purpose of HTML attributes?
Attributes provide additional information about the contents of an element
Made up of two parts, a name and a value. Separated by an equal sign
Every HTML element has its own behavior
Give an example of an HTML entity (escape character).
< < > > & & “ &
How do block-level elements affect the document flow?
They stare a new line in the browser window
Examples of block elements are h1, p, ul, li
How do inline elements affect the document flow?
Elements that will always appear to continue on the same line as their neighboring elements
a , b, em, img
What are the default width and height of a block-level element?
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”.
100% - width
Auto - height
What are the default width and height of an inline element?
Width - auto
Height - auto (equal to the contents)
Take exactly as much space as is required/needed
What is the difference between an ordered list and an unordered list in HTML?
Ordered list Where each item in the list is numbered Unordered list Lists that begin with a bullet point Rather than characters that dictate orders
Is an HTML list a block element or an inline element?
Block element
What HTML tag is used to link to another website?
<a> tag element, however, you should use absolute URL when linking to another website
Anchor element
Called anchor element because it is ‘dropping anchor in a certain spot’</a>
What is an absolute URL?
Full web address
An absolute URL starts with the protocol and domain name for that site, and can be followed by the path to a specific page.