Module 1 HTML & CSS Flashcards
Where do you put non-visible content about the HTML document?
In the head element which contains information about the page. Head element can also contain the title element which is seen in top of browser or browser tab. Example also, favicon, preview image.
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?
Within the !Doctype declaration and HTML element. Head should come before body
What is the purpose of a !DOCTYPE declaration?
It tells the browser which version of HTML the page is using.
Give five examples of HTML element tags.
- head, 2. body of visible content, 3. h1-h6 headings, 4. p paragraph, 5. img image tag to add images
What is the purpose of HTML attributes?
They provide additional information about the contents of the element. They are made up of a name and a value separated by equal sign =. Example from reading: lang=”en-us” for p tag
Give an example of an HTML entity (escape character).
Ampersand. Escape characters are special characters used in and reserved. Typed out as a code. Also allows for adding symbols such as currency, math characters, copyright/trademark, etc.
How do block level elements affect document flow?
They take up full width of the max width of container and its own line.
How do inline elements affect the document flow?
They take up only the space needed within that line.
What are the default width and height of a block-level element?
Width is entire parent container and height of the content. This can be changed by css.
What are the default width and height of an inline element?
Width is only the content and height is of the content. Inline will not let you change size, it is always only size of content.
What is the difference between an ordered list and an unordered list in HTML?
Ordered lists are numbered (lettered when nested), unordered lists are bulleted.
Is an HTML list a block element or an inline element?
Block
What HTML tag is used to link to another website?
the a tag with herf attribute
What is an absolute URL?
The full http link to a website
What is a relative URL?
A link to a folder or page within the website
How do you indicate the relative link to a parent directory?
You have to move up the directory first with ../
How do you indicate the relative link to a child directory?
You just have to name the child folder
How do you indicate the relative link to a grand parent directory?
You have to chain ../../ up the directories.
How do you indicate the relative link to the same directory?
You just name the file directly
What is the purpose of an HTML form element?
Allows webpage author to gather information entered by a user
Give five examples of form control elements.
text, password, text area, radio, checkbox, dropdown, multiple select, file input, submit