Block and Inline
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Obcaecati, atque!
This is another p tag but on the same line proving p is block
Lorem ipsum dolor sit amet consectetur adipisicing elit. Nobis voluptate ipsam laboriosam harum ex ut? Eos minus expedita magni nemo This is another span tag but on same line prooving span is inline
Uses of different Tags in HTML
Use of
tag and tags
This is superscript and this is subscript
Use of
tag
This text is marked
Use of
tag
This text is quoted
Use of
tag
This text is cited
Use of
tag
Use of
tag
This text is blockquoted
The
tag is used to display a scalar measurement in a known range.
This is a meter of value 50 out of 100.
The
tag is used to display a progress bar or sometimes as a loader
As a loader :
As a progress bar :
The
tag is used to shoe additional info which the user can open and close on demand
I am Summary
I am the detailsEntities
https://www.science.co.il/internet/html/Smileys.php 😵 😇 😅-
For extra space:
-
Paragraph symbol:<
-
Pound symbol:£
-
Copyright:©
-
Arrow:⇛
-
Empty character :
Adding Media In HTML
I am a hidden image
Adding a Video
Adding an Audio
Adding a Youtube Video
Favicons Icons
Adding Icons and Favicons
CDN - content delivery network - can be used to display icons from others server
- Lineicons
- Fontawesome:
Fontawesome Icon
Adding favicon to title bar!
Using:
just select the image
download the zip
and use this .icon link in the title bar this is the ideal way of using favicon in the title bar
just select the image
download the zip
and use this .icon link in the title bar this is the ideal way of using favicon in the title bar
Types of CSS Selectors - 4
- Descendent Selector - called spacer
- Child Selectors
- adjacent sibling selector
- general sibling selector
-
input:required : when the input field is required
-
input:disabled : when the field needs to be disabled
-
input:placeholder
-
input:readonly : for readonly field
-
input:invalid : when required field is empty, or invalid input submitted
-
input:valid : when valid submission
-
input:in-range : when in range
-
input:out-of-range : when out of range
- hover
- active
- focus
- a:link
- a:any-link
- a:visited
inside div wala para
inside h2 wala para
CSS SPECIFICITY
What is Specificity?
If there are two or more CSS rules that point to the same element, the selector with the highest specificity
value will "win", and its style declaration will be applied to that HTML element.
Specificity Hierarchy:
Every CSS selector has its place in the specificity hierarchy. There are four categories which define the specificity level of a selector:
- on top of all is !important
- Inline styles - Example: h1 style="color: pink;"/h1
- IDs - Example: #navbar
- Classes, pseudo-classes, attribute selectors - Example: .test, :hover, [href]
- Elements and pseudo-elements - Example: h1, :before
On top of all these is !important used to override the rule
CSS Layout
-
- new line, full width of PARENT, from left to right,
- ex. div h1 p, we can set width height of the element
- to check if an element is block or not just add a css style background color red, and see if this makes the entire length red, its block else not.
level
-
- NOT new line, NOT TAKE FULL width of PARENT, TAKES space as necessary
- cant set width height of teh element
- ex. span a img
- to check if an element is inline or not just add a css style background color red, and see if this doesnt makes the entire length red, its inline, also oyu cant adjust height width.
level
-
- we can override display property from inline to block and vice erse
- element sit next to other element
- it doesnt add a line break after the element
- use display:inline-block
- use display: none to hide
level
Types of position
- Static - default, cant add top/bottom/left/right
- Relative - posn related to normal posn, can add t/b/l/r, other elmts behave there is no element
- Fixed - posn related to viewport, affected by tblr, doesnt leave gaps
- Absolute - posn related to nearest parent, aff by tblr, ti move from normal flow it will look up if the parent has a position relative otherwise it document body
- Sticky - you can have tblr
Animation Properties
- Name
- Duration
- Timing-function
- Linear
- Ease
- Easein
- Ease-out
- Delay
- Iteration-count
- Keyframes
How to use animation:
- Create using keyframes
- A dd animation to eleemnt
Responsive Design
- name = "viewport"/content = "width = device-width
checkout Mydevice.io for viewport (the visible part of your applncn)
- Media Query - using @media screen and (min-width:600px){ css }
Commonly used breakpoints:
- /* Extra small devices (phones, 600px and down) */ @media only screen and (max-width: 600px) {...}
- /* Small devices (portrait tablets and large phones, 600px and up) */ @media only screen and (min-width: 600px) {...}
- /* Medium devices (landscape tablets, 768px and up) */ @media only screen and (min-width: 768px) {...}
- /* Large devices (laptops/desktops, 992px and up) */ @media only screen and (min-width: 992px) {...}
- /* Extra large devices (large laptops and desktops, 1200px and up) */ @media only screen and (min-width: 1200px) {...}
FLEXBOX
It has a parent(container) and a child(elements wrapped - flex items)
Flex container property:
- flex direction
- justify content
- align items
- align content
- flex wrap
- flex flow
Flex item property:
- order number
- flex: number | auto| none
- align-self: flex-start end center baseline stretch
Customized vs code theme
- install extension autorename
- install extension night owl
- copied json command from teh internet
- settings > edit in settings.json
- paste json commands for customizing
- extensions > night owl > theme > italics
CSS FRAMEWORKS