HTML Flashcards
(31 cards)
Where do you put non-visible content about the HTML document?
inside head tags
Where do you put visible content about the HTML document?
inside body tag
Where do the and tags go in a valid HTML document?
Under !DOCTYPE html declaration
Under HTML opening tag
head 1st
body 2nd
What is the purpose of a declaration?
The DOCTYPE declaration is an instruction to the web browser about what version of HTML the page is written in.
Give five examples of HTML element tags.
html, head, body, h1, p tags etc.
What is the purpose of HTML attributes?
All HTML elements can have attributes
Attributes provide additional information about elements
Attributes are always specified in the start tag
Attributes usually come in name/value pairs
Give an example of an HTML entity (escape character).
http://www.htmlandcssbook.com/extras/html-escape-codes/
How do block-level elements affect the document flow?
By default, block-level elements are laid out in the block flow direction. Each one will appear on a new line below the last one, and they will be separated by any margin that is set on them.
How do inline elements affect the document flow?
They don’t appear on new lines; instead, they sit on the same line as one another and any adjacent (or wrapped) text content
What are the default width and height of a block-level element?
a block level element’s content is 100% of the width of its parent element, and as tall as its content.
What are the default width and height of an inline element?
Inline elements are as tall as their content, and as wide as their content. You can’t set width or height on inline elements — they just sit inside the content of block level elements.
What is the difference between an ordered list and an unordered list in HTML?
In an ordered list the order in which items are presented is important and will be marked with a number.
An unordered list is simply a list of related items whose order does not matter and will be marked with bullet points.
Is an HTML list a block element or an inline element?
They are a block-level tag.
What HTML tag is used to link to another website?
anchor tag - hyperlink
What is an absolute URL?
it’s the full URL of the page that you linking to.
What is a relative URL?
a relative URL assumes that the link you add is on the same site and is part of the same root domain
How do you indicate the relative link to a parent directory?
href=”../index.html”
How do you indicate the relative link to a child directory?
href=”directory/index.html”
How do you indicate the relative link to a grand parent directory?
”../../index.html”
How do you indicate the relative link to the same directory?
“index.html”
What is the purpose of an HTML form element?
element represents a document section containing interactive controls for submitting information.
Give five examples of form control elements.
- text input
- radio selector
- check box
- drop down
- submit button
Give three examples of type attributes for HTML elements.
button checkbox date email file
Is an HTML element a block element or an inline element?
inline