A markup language is a computer language that defines
the structure and presentation of raw text.
Markup languages work by surrounding raw text with
information the computer can interpret, "marking it up" to
be processed.
In HTML, the computer can interpret raw text that is
wrapped in HTML elements.
These elements are often nested inside one another, with
each containing information about the type and structure
of the information to be displayed in the browser.
<element> row text </element>
Hyper Text is text displayed on a computer or device that
provides access to other text through links, also known as
“hyperlinks.”
Body
elements
Style
elements
Anchor
elements
Image
elements
List
elements
Other
elements
H1 - H6 Section heading
P Defines paragraphs in the document.
BR
Puts a single break in the middle of a
paragraph, list item, etc.
HR
Runs a horizontal line across the page (or
table cell)
DIV
Division - Defines a particular section of the
document. Used to spread document
attributes across a whole section.
SPAN
used to group inline-elements in a
document
Body
elements
Style
elements
Anchor
elements
Image
elements
List
elements
Other
elements
UL
Unordered list. Bullet List. Items in the list
are LI elements.
Lists can be nested.
OL
Ordered list. Numberd (or lettered) list.
Items in the list are LI elements.
Lists can be nested.
LI
List item. An item in a bullet or numbered
list.
DL
Definition list. A list of terms with definitions
or entries with annotations.
DT
In an annotated list, the item or term being
annotated
DD
In an annotated list, the annotation or
definition
Semantic HTML - Semantics is the study of the
meanings of words and phrases in a language.
Semantic elements = elements with a meaning.
A semantic element clearly describes its meaning to both
the browser and the developer.
.classA + .classB {
color: red;
}
.classA ~ .classB {
font-size: 30px;
}
It will select only the element that is
immediately preceded by the former element.
#container > ul {
color: red;
}
direct children
It will select all the elements that match after classA
Length units
CSS has several different units for expressing a length.
Many CSS properties take "length" values, such as width,
margin, padding, font-size, border-width, etc.
cm Centimeters
mm Millimeters
in inches
px
pt 1pt = 1/72 of in
pc 1pc = 12pt
% Percentage
vh
1% of the height of
the viewport
vw
1% of the width of
the viewport
rem
relative to font size
of the root element
em
Relative to the font
size of the element
The meta tag
Metadata is data (information) about data.
The <meta> tag provides metadata about the HTML
document. Metadata will not be displayed on the page,
but will be machine parsable.
HTML5 introduced a method to let web designers take
control over the viewport, through the <meta> tag.
<meta name="viewport" content="width=device-width, initial-scale=1.0">
All HTML elements can be considered as boxes.
In CSS, the term "box model" is used when talking about
design and layout. The CSS box model is essentially a
box that wraps around every HTML element.
the display property
display is CSS's most important property for controlling
layout. Every element has a default display value
depending on what type of element it is.
The default for most elements is usually block or inline.
div is the standard block-level element. A block-level element starts on
a new line and stretches out to the left and right as far as it can.
span is the standard inline element. An inline
element can wrap some text inside a
paragraph <span> like this </span> without
disrupting the flow of that paragraph. The a
element is the most common inline element,
since you use them for links.
Another common display value is none. It is commonly
used with JavaScript to hide and show elements without
really deleting and recreating them.
Positioning
The position property specifies the type of
positioning method used for an element (static,
relative, fixed, absolute or sticky).
Static - HTML elements are positioned static by default.
positioned according to the normal flow of the page.
Relative - behaves the same as static unless
you add some extra properties
Top: 200px
Left: 100px
A fixed element is positioned relative to the
viewport, which means it always stays in the
same place even if the page is scrolled.
Absolute is the trickiest position value.
absolute behaves like fixed except
relative to the nearest positioned ancestor
relative
Stacking
The z-index property specifies the stack order of an
element.
An element with greater stack order is always in
front of an element with a lower stack order.
Note: z-index only works on positioned elements
Float's sister property is clear. An element that has the clear property set
on it will not move up adjacent to the float like the float desires, but will
move itself down past the float.
float: left float: right
not cleared
the great collapse
If this parent element contained nothing but
floated elements, the height of it would literally
collapse to nothing.
float: left float: left float: left
The column layout system
http://www.responsivegridsystem.com/calculator/
The column layout system
http://www.responsivegridsystem.com/calculator/
col-3 col-3 col-3 col-3
The column layout system
http://www.responsivegridsystem.com/calculator/
col-3 col-3 col-3 col-3
col-12
Flex box
The Flexbox Layout (Flexible Box) module aims at providing
a more efficient way to lay out, align and distribute space
among items in a container, even when their size is
unknown and/or dynamic (thus the word "flex").
Properties for the parent
.container {
display: flex;
}
This defines a flex container; inline or block depending on the
given value. It enables a flex context for all its direct children.
Functions
A function is very similar to a mixin, however the
output from a function is a single value. This can be
any Sass data type, including: numbers, strings,
colors, booleans, or lists.