HTML Flashcards
Where do you put non-visible content about the HTML document?
In the head element
Where do you put visible content about the HTML document?
In the body element
Where do the and tags go in a valid HTML document?
They go inside the html
element
What is the purpose of a declaration?
This is used to tell the browser which version
of HTML the page is using
What is the purpose of HTML attributes?
hey provide additional information about the content of an element
Give five examples of HTML element types
– h1 - Heading 1 – img - Images – p - Paragraphs – head - meta data – body - visible html content – title - title of the page displayed by the browser
What is the purpose of HTML attributes?
They provide additional information about the content of an element
Give an example of an HTML entity (escape character).
Less-than sign < or Ampersand &.
We use escape characters to type a symbol that has a special meaning in the programming language
How do block-level elements affect the document flow?
Block elements will always appear to start on
a new line. Some examples are: h1, p, ul, li
How do inline elements affect the document flow?
Inline elements will always appear on the same line
as their neighboring elements. Some examples are: a, b, em, img
What are the default width and height of a block-level element?
height: a new line above and below
the block element. It will be dictated by the content: width of the containing block of the containing
element
What are the default width and height of an inline element?
height and width: only occupy the space
bounded by the tags defining the element
What is the difference between an ordered list and an unordered list in HTML?
ordered lists are where each item is numbered whereas unordered lists are bullet points rather than characters indicating order. As an example, <ol> will reate an ordered list and </ol><ul> will create an unordered list. <li> are used for list elements</li></ul>
Is an HTML list a block element or an inline element?
HTML list is a block element
What HTML tag is used to link to another website?
<a> is the tag used for linking to another website</a>
What is an absolute URL?
An absolute URL is a web address that we would type into a browser if we want to visit a specific page. It will starts with a domain name for the site and followed by the path to a specific page
What is a relative URL?
relative URL on the same website is a shorthand version of absolute URL because we can omit the domain name. We can use relative URLs to create links to pages without setting up domain name or hosting.
What is the internet?
t is a global network of computers that are connected to each other. Every computer on the public internet has an IP address.
How does the internet work?
Your browser needs to know what a domain name means. A DNS (domain name system) lookup is performed to translate the domain name to an IP address. Next, the browser opens a TCP connection to the computer at the IP address. Then, the browser sends an HTTP request to the computer at the IP address. Lastly, the browser receives a response from that computer at that IP address (originally this was an HTML document).
How do you indicate the relative link to a parent directory?
We will use ../ followed by the path to the file to indicate a parent directory
How do you indicate the relative link to a child directory?
We will use the path of the file to the child directory
How do you indicate the relative link to a grand parent directory
We will use ../../ followed by the path to the file to indicate a grand parent directory
How do you indicate the relative link to the same directory?
We will use the file name
What is the purpose of an HTML form element?
Forms are used to allow user to search (such as
Google), registering membership to a website (Google account), shopping online (Amazon), and signing
up for newsletter or mailing lists. In essence, to collect user information
Give five examples of form control element
Input, button, submit, form, field set, label, legend, text
area, select, option
Give three examples of type attribute values for HTML elements
Submit, Text, Checkbox,
Is an HTML element a block element or an inline element?
The input is an inline block
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 footnotes)
What purpose do the thead and tbody elements serve?
thead gives us the heading of the table where tbody gives us the body of the table
Give two examples of data that would lend itself well to being displayed in a table.
dates and time, sales, timelines, grades