HTML Flashcards
what is the purpose of HTML attributes?
Attributes provide additional information about the contents of an element. They appear on the opening tag of the element and are made up of two parts: a name and a value.
customize html element.
what is an HTML entity?
- it is used to display invisible characters and reserved characters that would otherwise be interpreted as HTML code .
- ampersand(&) + word + semicolon(;)
- timesaving.
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”.
- these may appear only within a element.
- address, h tags, header, div etc.
- default width: 100/ height: auto
how do inline elements affect the document flow?
- inline elements are those which only occupy the space bounded by the tags defining the element, instead of breaking the flow of content.
- an inline element does not start on a new line and only takes up as much width as necessary.
- a, abbr, br, button, cite, code, del, em, data, img, input, label, span, strong, sub, sup, template etc.
- width: auto / height: auto
what is the difference between unordered list & ordered list?
- the <ul> element is for grouping a collection of items that do not have a numerical ordering, and their order in the list is meaningless. typically, unordered-list items are displayed with a bullet, which can be of several forms
- the ordered list items display with a preceding marker, such as a number or letter. therefore the order is meaningful.
</ul>
where do you put non visible content about the HTML document?
head tag
where do you put visible content about the html document?
body tag
where do the and tags go in a valid HTML document?
inside the html tags.
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.
is an html list a block element?
yes
what HTML tag is used to link to another website?
<a> (anchor tag). dropping an ‘anchor’ at some point in the html document.</a>
what is an absolute URL?
An absolute link is a hyperlink containing a full URL, which includes all the information needed to find a particular site, page or document or other addressable item on the Internet. This information includes: The protocol to use, such as HTTP (Hypertext Transfer Protocol) or FTP (File Transfer Protocol).
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.
how do you indicate the relative link to a parent directory?
../filename
how do you indicate the relative link to a child directory?
name of child folder/ filename