HTML and CSS Flashcards
HTML
- Hypertext Markup Language
- consists of entirely of tags
- files usually end in .html or .htm
Absolute filepaths
point directly to a file using a full path to its direction
Relative filepath
how to get to the file relative to the HTML file containing that link
eg. images/apple.jpg
what are the attributes to
img src=’picnic.jpg’ width=’200’/
src and width are attributes to img
b
bold text
i
italicized text
ul
unordered list
ol
ordered list
li
adds a list item to <ul> or <ol>
div
create layouts w/o a table
Input attributes
- name: ID for the input
- value: text displayed on/in the input
- placeholder: temporary, descriptive text
- tabindex: gives an order to the elements for users to “tab” through them
label for=” “
- associated filed becomes focused
- field becomes activated so that the user can begin typing in it
- reference field by its ID attribute
Captcha
- prevents bots from automatically filling out web forms
- eg. Google’s reCaptcha
In HTML, which attribute is used to specify that an input field must be filled out?
required
attribute to limit how many characters can be entered
“maxlength”
Server processing for form validation
- PHP is a common server-side language
- databases/external files
- processing orders (e-commerce)
- functions involving security
- anything that the host needs to know about or track
Client processing for form validation
- JavaScript is used for client side coding
- interactivity/animations
- non-secure form processing
- receiving user input in real-time
- loading or changing elements that appear on a user’s device
CSS
- Cascading Style Sheets
- only to style websites
Padding
space inside the element, keeping its contents away from the edges
Margin
space outside the element, keeping it away from other elements
‘position’ styles
static, relative, absolute, fixed, sticky
position: static;
default value, it’s added sequentially in the site and cannot be moved
position: relative;
similar to static but can be shifted w/ TRBL values
position: absolute;
- location is directly based on TRBL values within its parent
- precise location, doesn’t care what it’s underneath