Css
Css
Inline CSS:
A inline CSS is written using style attribute inside an html element , it
can apply styling to a single element.
Internal CSS:
In an internal CSS , we use style tag in the head tag, which can be
applied to the current html document but not all others html
documents
External CSS:
In an external CSS, we use separate file to include the CSS file in the
html, which can be reused for many documents.
Cascading means which style should be applied to the elements
when multiple styles are used.
We have inline>internal==external
Internal and external have same preference, but if we use internal
first and used external(last) last, the external will applied and vice-
versa
Selectors in CSS:
Selectors are nothing but the html elements on which we apply the
styling, we have 3 selectors Element selector, class selector and id
selector
1)Element selector: we use the elements like h1, p
Background image:
Background-repeat: By default the background-repeat works for both
horizontal and vertical direction.
Background-size:
Background-position: By default it is placed at top-left
Background-attachment:
Border:
The border is used to set the elements border, CSS border specifies
you to set the element’s width, style, colour.
Text align and direction:
Text-decoration:
Underline
Overline
Line-through= cut the text
None= removes the text-decoration, basically used for anchor tags
Content overflow in CSS:
Overflow: overflow property specifies what happened if their the
content is more than the box size such that it becomes overfit.
Units in CSS:
For some CSS properties negative values are also allowed for example
margin
There are two types of length units:
1)Absolute: absolute units are fixed length of an element, but not
recommended to use as screen size vary.
Eg: cm, px, mm
2)Relative: these specify the length related to another length
property
Font-weight:
The thickness of our font, we have bold, lighter and the value varies
from 100-900
Font-family: The handwriting for our text
Line-height:50px|normal;
The distance between two lines
Text-transform:lowercase|uppercase|capitalize
Border-radius: This is used to round the edges of the element’s
border
Border-radius:50%|10px; 50% mean to make circle
Padding:
Padding-top|right|bottom|left
Margin: This is similar to the padding , but this is distance between
one box and other box
Level-3
Units in CSS
Relative: %,em,rem
Percent(%): It is often used to define the size relative to its parent
object
Width:33%;
Em: the size depends on the parent
Fontsize:3em; means 3 times of parent’s size
Rem:font size of root element like in body it have default 16px
If we use font-size:5rem; means 5*16=80px
Vh:viewport of height
1vh means 1 percent to horizontal height
vw: viewport of width
Position Property:
The position property sets how an element is positioned in a
document
Position: static/ relative /absolute/ fixed
Static: default position (The top, right, bottom, left, z-index have no
effect)
Relative: element is relative to itself (all above properties will work)
Absolute: positioned relative to its closest non-static ancestor
This direction sets how flex items are placed in the flex container,
along which axis and direction
Flex-direction : row(default) | row-reverse | column | column-reverse
Row: main-axis: row and direction is from left to right
Row-reverse: main-axis: row but the direction is from right to left
Flex-end:
Centre:
Space-around:
Space-evenly:
Wrap:
Wrap-reverse
End
Centre:
Flex Properties, these are applied on the flex items, these are having
higher priority than flex container properties
Align-self: flex-start | flex-end | centre
Alignment of individual along the cross axis
Flex-grow: how much a flex item will grow relative to the rest of the
flex items if spaces is available
Flex-shrink:
So we use this
1) The command is used to see what branches are there and in which
branch we are currently
2) The command is used to rename the branch name which we are
currently on git branch -M myBranch
3) to navigate to another branch
4) to create and navigate to that new branch
4) to delete a branch, note: we cannot delete the branch which we
are currently on , to delete the current branch we need to navigate to
some other branch and we can delete that.
The third image (push) is used to push code from local to remote
repo which is in github
Undoing Changes:
1) This is used when we added but not committed
One file: git reset index.html
Multiple files: git reset
2) This is used when we added and committed