LFZ Module 1 Flashcards
(179 cards)
Where do you put non-visible content about the HTML document?
Inside the head tags. It is a container for metadata, which is data about the html document used by browsers, search engines, and other web services.
Where do you put visible content about the HTML document?
Inside the body tags.
Where do the head andbodytags go in a valid HTML document?
After the !DOCTYPE tag and inside the html tags. Head on top and then body.
What is the purpose of a!DOCTYPE declaration?
To tell a browser which version of HTML the page is using. It helps render a page correctly.
Give five examples of HTML element tags.
body, h1, head, ol, and p.
What is the purpose of HTML attributes?
Attributes provide additional information about the element’s content. Specified in the start tag. Comes in name and value pairs (name=”value”).
Example: href, src and style.
Give an example of an HTML entity (escape character).
Characters used in and reserved in HTML code.
Example: Ampersand (&)
How do block-level elements affect the document flow?
Always starts on a new line in the browser.
Example: h1, p, ul, li
How do inline elements affect the document flow?
Inline elements always continue on the same line as their neighboring elements.
Example: a, b, em, img
What are the default width and height of a block-level element?
Takes up the full width available of its parent element (container), and vertical space is the height of its contents.
What are the default width and height of an inline element?
Only takes up as much width as necessary bounded by the tags defining the element. Even if we set the width and height, it will only take up what is necessary for that content.
What is the difference between an ordered list and an unordered list in HTML?
Ordered Lists (ol) are lists that are numbered in order. Example: Steps for a recipe
Unordered Lists (ul) are lists that begin with a bullet point and not in a particular order. Example: Ingredients for a recipe
Is an HTML list a block element or an inline element?
Block Element, because each list item starts on a new line.
What HTML tag is used to link to another website?
The a (anchor) element.
What is an absolute URL (Uniform Resource Locator)?
It is the URL (web address) of the value for the href attribute when linking to other websites.
What is a relative URL (Uniform Resource Locator?
A shorthand to link to other pages on the same website. If all the pages are in the same folder, then the href value is the name of the file. No need to include domain name.
Example: href=”index.html”, href=”contact.html”
How do you indicate the relative link to a parent directory?
../
Example: ../index.html
How do you indicate the relative link to a child directory?
Name of child folder followed by a forward slash then the file name.
Example: music/listings.html
How do you indicate the relative link to a grand parent directory?
../ ../ to go up two folders followed by the file name.
Example: ../../index.html
How do you indicate the relative link to the same directory?
./
OR Just use the file name, nothing else.
Example: review.html
What is the purpose of an HTML form element?
To collect information/user data from visitors to the site. Also, for searching, registering, shopping online, signing up newsletters or mailing lists.
Give five examples of form control elements.
”, , , and “
Give three examples oftypeattributes for HTML”“elements.
type=text, type=password and type=email
Is an HTMLelement a block element or an inline element?
Inline element, because it continues on the same line.