HTML Flashcards
How do block-level elements affect the document flow?
Always start new line. Full width of the containing block (parent element).
How do inline elements affect the document flow?
Can share space. Capable of sharing space, but don’t always share space.
What are the default width and height of a block-level element?
A block-level element always starts on a new line and takes up the full width available (stretches out to the left and right as far as it can). Width=100% Height= as much content there is. (Auto)
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 & height = auto
Do not use these
<b>, <i>, <br></br></i></b>
<s> <del> <strike>
</strike></del></s>
<s> sale price (cross off old price)
<del> cancelled concert dates (still needs to show)
<strike> "don't use this anymore" "I have to leave this here but don't use it"
<s> replaced strike
</s></strike></del></s>
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 - it stacks vertically
What HTML tag is used to link to another website?
the opening
<a> tag and the closing </a> (a= anchor)
What is an absolute URL?
What is a relative URL?
When you link to a different website, the value of the href
attribute will be the full web address for the site, which is known as an absolute URL.
When linking to other pages within the same site, you can use relative URLs (my local files) begin with / or . or ..
Where do you put non-visible content about the HTML document?
Head & title element
Where do you put visible content about the HTML document?
Inside the body element
Where do the <head> and <body> tags go in a valid HTML document?
Inside the html element
What is the purpose of a <!DOCTYPE> declaration?
to tell a browser which version of HTML
the page is using
Give five examples of HTML element types
HTML, head, title, body, p, h1, div, etc.