HTML Flashcards
Where do you put non-visible content about the HTML document?
Inside the head 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 the !DOCTYPE declaration?
To tell the browser which version of HTML to use
Five examples of HTML element tags
html, head, body, p, div
What is the purpose of HTML attributes?
Gives you more information about the content of that element
Give an example of an HTML entity (escape character)
Copyright symbol, Registered Trademark, & (ampersand), < > (less/greater than)
How do block-level elements affect the document flow?
They start a new line
How do inline elements affect the document flow?
They continue on the same line
What are the default width and height of a block-level element?
Width is 100% of the page, height is automatic
What are the default width and height of an inline element?
Width and height are both auto (content width and content height)
What is the difference between an ordered list and an unordered list in HTML?
Ordered list items are numbered, unordered list items are bulleted
Is an HTML list a block element or an inline element?
Block
What HTML tag is used to link to another website?
a element tag
What is an absolute URL?
URL that points to the direct location on the web (with a domain name)
What is a relative URL?
URL that shows a path to the file
How do you indicate the relative link to a parent directory?
Use ../ followed by the file name
Ho do you indicate the relative link to a child directory?
Use name of the child directory followed by a / (forward slash) and file name
How do you indicate the relative link to a grandparent directory?
Repeat two ../’s (ex. ../../) followed by the file name
How do you indicate the relative link to the same directory?
Just use the file name
What is the purpose of an HTML form element?
To hold in form controls
Give five examples of form control elements
Text, radio, submit, email, select
Give three examples of type attributes for HTML input elements
id, src, placeholder
Is an HTML input element a block or an inline element?
Inline
What are the six primary HTML elements for creating tables?
table, thead, tbody, tr (table row), th (table heading), td (table data)
What purpose do the thead and tbody elements serve?
thead is used to distinguish the title/heading of the content while tbody is used to group the actual content
Give two examples of data that would lend itself well to being displayed in a table
Expense budgeting, game scores