HTML Flashcards
Where do you put non-visible content about the HTML document?
In the <head> element
Where do you put visible content about the HTML document?
In the <body> element
Where to the <head> and <body> tags go in a valid HTML document?
Between the <html> and </html> tags, in 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.
<body>, <head>, <title>, <h1>, <p>, <strong>, <em>, <img></img>
</em></strong></p></h1></title></head></body>
What is the purpose of HTML attributes?
To tell us more about the content of the element
Give an example of an HTML entity (escape character).
<, >, &, ‘,, ™ , ® , ©
How do block-level elements affect the document flow?
They each start on a new line
How do inline elements affect the document flow?
The continue on the same line
What are the default width and height of a block-level element?
The width is the width of the whole line and the height is the height of its content
What are the default width and height of an inline element?
The width and height are the width and height of its content
What is the difference between and ordered list and an unordered list in HTML?
Each item in an ordered list is numbered while each item in an unordered list begin with a bullet point rather than characters that indicate order
Is an HTML list a block element or an inline element?
Block element
What HTML tag is used to link to another website?
<a> anchor tag</a>
What is an absolute URL?
A URL that visits a specific page. It starts with the domain name for that site and can be followed by the path to a specific page
What is a relative URL?
A URL that links to other pages within the same site. They do no need to specify the domain name
How do you indicate the relative link to a parent directory?
Use ../ to indicate the folder above the current one, then follow it with the file name
how do you indicate the relative link to a child directory?
Use the name of the child folder, followed by a forward slash, then the file name
How do you indicate the relative link to a grand parent directory?
Use ../../ followed by the file name
How do you indicate the relative link to the same directory?
Use just the file name
What is the purpose of an HTML form element?
To collect information to send to the server
Give five examples of form control elements.
Radio buttons, checkboxes, drop-down boxes, text input, text area, password input, file input box, submit button
Give three examples of type attribute values for HTML <input></input> elements
text, password, email, file, radio, checkbox
Is an HTML <input></input> element a block element or an inline element?
It is an inline-block element, which is a type of inline element
What are the six primary HTML elements for creating tables?
<thead>, <tbody>, <tfoot>, <tr>, <td>, <th>
</th></td></tr></tfoot></tbody></thead>
What purpose do the thead and tbody elements serve?
They are semantic elements, where thead defines a set of rows defining the head of the columns of the table and tbody encapsulates a set of table rows, indicating that they comprise the body of the table.
Give two examples of data that would lend itself well to being displayed in a table.
Financial/stock reports, TV schedules, sports results, train timetables