HTML Flashcards
Where do you put non-visible content about the HTML document?
Non-visible content is put inside of the head element of the HTML document
Where do you put visible content of the HTML document?
Visible content is put inside of the body element
Where do the head and body tags go in a valid HTML document?
The head and body tags are put after the html tag, respectively.
What is the purpose of the DOCTYPE declaration?
The purpose of the DOCTYPE declaration is to let the browser know what version of HTML (or any language) we’re using.
Give FIVE examples of HTML element types
h1 - h6 body img p a
What is the purpose of HTML attributes?
The purpose of HTML attributes is to provide additional info about the element that it was attached to. Adds special/unique functions to an element. To make it more specific.
Give an example of an HTML entity (escape character)
The ampersand (&) would be &
How do block-level elements affect the document flow?
Block-level elements always begin on a new line.
How do inline elements affect the document flow?
Inline elements will share the same line with other inline elements.
What are the default width and height of a block-level element?
The default width of a block-level element is all (100%) of the horizontal space of its parent element (container)
The default height is the height of its contents
width = 100%; height = auto;
What are the default width and height of an inline element?
The default width of an inline element is the space between the tags that it is within. The default height is the height of its contents.
width = auto; height = auto;
What is the difference between an ordered list and an unordered list in HTML?
An ordered list is numbered. An unordered list is formatted with bullet points.
Is an HTML list a block element or an inline element?
An HTML list is a block element.
What are the three types of HTML lists?
Ordered, unordered, and definition.
What are definition lists used for?
To define terminiology.
Can lists be nested within one another?
Yes.
What element links to another website or another part of a website? What attribute must be assigned to it ?
the a (anchor) element
the href attribute
What is an absolute URL?
The entire URL of a website. Located outside of your domain, wherever you’re working.
What is a relative URL?
A URL located within the domain you’re working on. On the same computer you’re working.
How do you indicate the relative link to a parent directory?
../filename
How do you indicate the relative link to a child directory?
foldername/file.name
How do you indicate the relative link of a grandparent directory?
../../filename
How do you indicate the relative link to the same directory?
filename
What is the purpose of an HTML form element?
To group together form control elements. The purpose of an HTML form element is to collect information from a user.