Contributor: Daniel Chang
- It tells the browser what version the language the page is written in.
- It tells your browser how to render your document.
- Quirks mode - for older browsers.
- Full standards - the behavior of the website is exactly as described by HTML/CSS specifications.
- Almost standards is in between.
- XHTML is identical to HTML but more strict. Does not allow for mistakes. Stricter error handling.
- The data-* attributes is used to store custom data private to the page or application.
- The data-* attributes gives us the ability to embed custom data attributes on all HTML elements.
-
Hi
- more semantic text markup
- new form elements
- video and audio
- new javascript API
- canvas and SVG
- new communication API
- geolocation API
- web worker API
- new data storage
- localStorage - stores data clientside. data persists until user clears browser cache/local stored data. (window)
- sessionStorage - data is also stored clientside but is destroyed when browser closes.
- cookie - stored data that is usually accessed server-side. It can expire.
<script>
: HTML file will be parsed until the script file is hit. Parsing will stop to fetch the file and the script will be executed before parsing continues.<script async>
: Downloads the file during HMTL parsing. HTML parsing will pause to execute file when finished downloading.<script defer>
: Downloads file during HTML parsing. Will only execute after parsing is completed. Also guaranteed to execute in order of document appearance.- Read more here: http://www.growingwiththeweb.com/2014/02/async-vs-defer-attributes.html
- ID and Classes can both be used to select an element to modify using CSS.
- ID is more specific.
- Ideally you would want 1 ID and multiple classes.
- CSS resets wipes out all styling. Normalizing tries to make the styling more consistent across all browsers.
- Using css resets and normalizing gives you more control over how items are displayed.
- Prevents unexpected behaviors.
- It pushes the element to the side you've chosen.
- All other elements will take up the space (if float left, other elements will take up the right side)
- Higher z-index will put item in the front.
- Lower z-index will put the item further behind.
- Grouping elements in boxes.
- Block formatting contexts:
- Stop margins from collapsing
- Restrain floats
- Contain floats
- Clear (none, left, right or both)
- Float
- Flex
- Sprite is one big image containing several frames (smaller images).
- You write code to cycle through the frames. (change the position)
- I like to simply change background image.
What are the different ways to visually hide content (and make it available only for screen readers)?
- Display: none; (stuff shifts)
- visibility: hidden; (stuff doesn't shift)
- I like flexbox;
- I can also manually create the grid system using float.
- Bootstrap? also has one that you can use.
- I use min-width and max-width.
- Use dev tools to set the screen small.
- Scalable vector graphics.
- SASS lets you store values in variables. This makes it easier for others to read and to modify later.
- One way is to use a font generator.
- Another way would be to find a similar font.
- There is specificity
- (Most specificity) inline style -> ID -> class -> elements (Least specificity)
- display: block, inline, inline-block, list-item, none, table, table-cell, table-row, flex
- block - takes up the entire width=
- inline - takes up only as much as necessary. Cannot have a width and height set
- inline-block - takes up the entire width. Will adjust to height. Can wrap.
- The CSS box model is essentially a box that wraps around every HTML element. It consists of: margins, borders, padding, and the actual content.
- Content - The content of the box, where text and images appear
- Padding - Clears an area around the content. The padding is transparent
- Border - A border that goes around the padding and content
- Margin - Clears an area outside the border. The margin is transparent
- The box model allows us to add a border around elements, and to define space between elements.^https://o.quizlet.com/i/-qntesLUKZF3Rdq4Bjn0ug_m.jpg
- The position property specifies the type of positioning method used for an element.
- Static: Default value. Elements render in order, as they appear in the document flow
- Relative: The element is positioned relative to its normal position, so "left:20px" adds 20 pixels to the element's LEFT position
- Absolute: The element is positioned relative to its first positioned (not static) ancestor element
- Fixed: The element is positioned relative to the browser window
- Initial: Sets this property to its default value.
- Inherit: Inherits this property from its parent element.