HTML/CSS Crash Course Flashcards
What is hypertext
text with links
What does markup language mean
text that is marked up so you know what it is supposed to do. Like this <h1>Title Page</h1>
What are the different attributes for input?
text, password, checkbox, radio, submit, button, email, number, date, file, hidden, search, url, tel.
What are the common semantic html tags
<semantic>
article, section, header, main, nav, aside, footer
</semantic>
How do you know you’re using semantic html correctly?
There is a clear understanding of the structure of the page without needing visuals from the browser.
What does the <pre> tag do?
The preformatted text tag. This tag preserves whitespace, which can be useful when indentation and newlines need to be preserved.
What are <tr> and <td>?
tr is a single row in the table, td is a single piece of data in the table
What would one use to group the table head and table body
<thead> and <tbody>
</tbody></thead>
What is the scope attribute used for?
It tells someone using a screen reader if the table heading is for the row or column. <th scope='col'>Budget</th>
What is <th>?
The heading of the data. This tells you what the data you’re looking at is. ie budget, spending, etc
How would you make a title for the table?
<caption>
</caption>
What is the name attribute used for in an input
It is used for form submission, the name is the key in the key value pair sent to the server.
It is also used when grouping inputs for a radio button.
Also form data retrieval with JavaScript, ie document.forms[“myForm”][“username”].value. where username is the name value.
What is the for attribute used for in the label tag?
It is used to associate that label with an input with that id.
for=”username” in the label for id=”username” in the input.
What is an attribute selector?
[type=”submit”] would select all elements with the type attribute set to “submit”. [type] on it’s own would select all elements with a type regardless of the value.
What is the special syntax that can be used with attribute selectors?
[href*=”blahblah”] would select and href with “blahblah” at any location.
[href^=”blahblah”] would select and href with “blahblah” at the beginning.
[href$=”blahblah”] would select and href with “blahblah” at the end.
What is a descendent combinator?
selector1 selector2 {
this selects all elements that match selector2 that
are descendents of selector1
}
What is a child combinator?
selector1 > selector2 {
this selects all elements that match selector2 that
are a direct child of selector1
}
What is a sibling combinator?
selector1 ~ selector2 {
this selects all elements that match selector2
and are a sibling of an element matching selector1
}