HTML Flashcards
• Where do you put non-visible content about the HTML document?
nested within the head element
this is not visible
This is where metadata is stored
• Where do you put visible content about the HTML document?
Within the body element
….
• Where do the
and tags go in a valid HTML document?
<
begins before the body and after the html element
body happens after the losing tag of the element
…
- 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. This ensures that the webpage is parsed the same way by different web browsers
Is an HTML list a block element or an inline element?
Block element
What is the difference between an ordered list and an unordered list in HTML?
- Ordered list uses numbers, unordered makes a list with data, usually bullet points
List 5 html elements
html, p, body, h1, img
Give an example of an HTML entity (escape character)
ampersand (&) with &
How do block-level elements affect the document flow?
A Block-level element occupies the entire horizontal space of its parent element (container), and vertical space equal to the height of its contents, thereby creating a “block”.
What is a relative URL?
A relative URL is a URL that only includes the path. The path is everything that comes after the domain, including the directory and slug. Because relative URLs don’t include the entire URL structure, it is assumed that when linking a relative URL, it uses the same protocol, subdomain and domain as the page it’s on.
What is an absolute URL
includes full link to website
What HTML tag is used to link to another website
an anchor tag
What is the purpose of an HTML attribute?
HTML attributes can be used to change the color, size, and other features of HTML elements. For example, you can use an attribute to change the color or size of a font for a text element or the width and height for an image element.
name - value
Escape Characters
There are some characters that are used in and reserved by HTML code. (For example, the left and right angled brackets.)
For example, to write a left angled bracket, you can use either < or <. For an ampersand, you can use either & or &.
How do you indicate the relative link to a parent directory?
../filename
How do you indicate the relative link to a child directory?
example/index.html
- How do you indicate the relative link to a grand parent directory?
../../
How do you indicate the relative link to the same directory?
- state name of file you’re looking for ./.
What is the purpose of an HTML form element?
- To collect data from users – group up form control elements, to send over to server – encapsulate all form control elements
Give five examples of form control elements.
Checkboxes, drop down, option, select, text input, password, file upload, text area
Give three examples of type attribute values for HTML elements.
- – date, image, file, submit, text,radio
Is an HTML element a block element or an inline element?
Inline
Span
default inline
div
default block