HTML Flashcards
Where do you put non-visible content about the HTML document?
In the “head” element. Also can add the Meta, title, and link for CSS Style etc.
Where do you put visible content about the HTML document?
In the “Body” element.
Where do the HEAD and BODY tags go in a valid HTML document?
Nested inside of the “HTML” element. HTML is the parent and “head” and “body” will be the child element of the HTML element.
Or Some developers make the HEAD and the BODY the sibling element of the HTML element, but nested within HTML tag.
What is the purpose of a “!DOCTYPE html” declaration?
To tell a browser which version of HTML the page is using.
Give five examples of HTML element types.
HEAD, BODY, H1, P, SPAN
What is the purpose of HTML attributes?
Attributes provide additional information about the contents of an element. Made of 2 parts: attribute (name) and a value (key).
Give an example of an HTML entity (escape character).
copyright © registered trademark ®
& copy ; & reg ;
How do block-level elements affect the document flow?
Block-level elements will always appear to start on a new line in the browser window.
How do inline elements affect the document flow?
Will always appear to continue on the same line as their neighbouring elements.
What are the default width and height of a block-level element?
Default width is the full 100% width of the line and height is auto.
What are the default width and height of an inline element?
The width of the content and the height of the content: auto.
What is the difference between an ordered list and an unordered list in HTML?
The ordered list will appear in numerical order from 1, 2, 3,…
The unordered list will appear as a bullet points
Is an HTML list a block element or an inline element?
List is a block element, will start a new line.
What HTML tag is used to link to another website?
an opening anchor tag “a” with href (Hypertext REFerence) and a closing tag “/a”
What is an absolute URL?
The full web address for the site. Starts with the domain name for that site, and can be followed by the path to a specific page.
What is a relative URL?
doesn’t need to specify the domain and a shorthand way to tell the browser where a page is in relation to the current page. Ex. when linking to other pages within the same site, you can use relative URL.
How do you indicate the relative link to a parent directory?
../ will move up to the parent directory
How do you indicate the relative link to a child directory?
./childname OR just the childname
How do you indicate the relative link to a grand parent directory?
../../ it will move the directories up by 2
How do you indicate the relative link to the same directory?
the file name
What is the purpose of an HTML form element?
Interactive control for submitting information.
An area that a user can interact with
A form refer to different elements that allow you to collect information from visitors to your site.
Give five examples of form control elements.
input, action, select, option, method, id, textarea, label, button
Give three examples of type attribute values for HTML “input” elements.
email, password, text, tel
Is an HTML input element a block element or an inline element?
Inline element
What are the six primary HTML elements for creating tables?
table, tr (table row), td (table data), th (table heading), thead (table header), tbody (table body), tfoot (table footer)
What purpose do the thead and tbody elements serve?
tbody is the main content of the table and the thead is the heading that has the different content as the tbody
Give two examples of data that would lend itself well to being displayed in a table.
a table of students and their grades for each of courses.
a menu from restaurant