Professional Documents
Culture Documents
Code Web Design
Code Web Design
Headings
Phrase tags
Layout tags (header, nav, section, article, aside, footer, details, summary)
Iframes
Best Practices
2–
CSS3
Links (a:link/visited/hover/active{color:})
Borders (border-width, border-color, border-style; can specify the side; border-image: source slice
round)
Cursor
Outline (outline-width/style/color)
Display ()
*display: flex/inline-flex the way the flex items’ll be shown, block or inline
*justify-content: aligns items, when they do not use all available space on the main-axis or container
#flex-start ou flex-end/center
*flex-wrap: wrap para quebra d linha dos items, qdo sobrepõem os containers
*flex: nº px definir o width de um item do container, pode levar 2 nºs o 1º, d proporção sem unidade
*order: nº aplicado num item, para qto maior, ele aparecerá no fim e o oposto é válido.
Background: linear/radial/repeat-gradient for gradients
media=”” for style or link tag, which devices’ll use these styles
media queries
*{border-sizing: border-box}
Screen <=480px
Orientation: portrait/landscape
Logical sections:
Sitewide (all used along the site, basic page layout: header, nav, logo, etc.)
*Break down by context/page or component they’re used on
Separate your CSS into reusable objects, reusable anywhere you need on ur site.
Block, a stand-alone entity (.btn). Element, item of the block (.btn__send). Modifier, flag
changing style or behavior (on a block or element)(example, .btn--orange)
Validation
HTML pattern?
CSS
:required / :valid
Display: grid
Grid-template-columns: 100px 40 px …;
grid-template-rows: 1fr 1fr 1fr;
grid-column-gap: 10px;
grid-row-gap: 10px;
.item1 {
grid-area: header;
}
grid-column: 1 / 3;
grid-row: 1 / 3;
DOM
document the document object, represents the HTML doc. Used to access all the page elements
body / cookie / doctype / documentElement (the <html> el) / documentMode (the mode used by the
browser) / domain / forms / head / images (all the <img>) / implementation (the DOM
implementation) /
*innerHTML
*innerText
Changing Style
*eventName = theFunction
*nodeType to get the type of a node (element, attr, text, comment or doc)
*getElementById()
#anchors, body, documentElement, embeds, forms, head, images, links, scripts, title.
Change elements
*setAttribute(attr, val)
*removeChild() / appendChild()
*removeEventListener(same parameters)
*createElement()
*createTextNode()
*appendChild() / removeChild()
*insertBefore(new,old) / replaceChild()
Events for all HTML elements (used with functions or any JS code)
*onload, onUnload practically to check browser version n so load the proper site version, store
cookies when user enters or leaves the page
BOM
window the window object, represents the browser’s window
Properties
Window Size
Window Location
*location.href/hostname/pathname/protocol with/out window.
Window Navigator
Methods
*open() / close() / moveTo() / resizeTo()
Window Location
Window History
*history.back() / history.forward()
Window Navigator
*alert()
Timing events
*setTimeout(function, milliseconds) waits for that milliseconds, then runs the function once With/out
window.
Cookie
*to remember info about the user. Deleted when browser’s closed
*document.cookie = “name=value;name2=value2”
Read cookies
*path=/ the cookie belongs to which page? By default, the current page
*expires=Thu, 18 Dec 2013 12:00:00 UTC to set expiry date
Delete a cookie
document.cookie = "username=; expires=Thu, 01 Jan 1970 00:00:00 UTC"; set expires to a past date