HTML5 CSS5
HTML5 CSS5
1.Doctype:
It gives the instruction to the web browser about the HTML version.
2.metaTag:
The meta tag is information about data. Metadata will not be displayed on the
application,
<head>
<title>Meta Tags Example</title>
<meta name = "keywords" content = "HTML, Meta Tags, Metadata"
/>
<meta name = "description" content = "Learning about Meta Tags."
/>
<meta name = "revised" content = "Tutorialspoint, 3/7/2014" />
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
</head>
<aside>
<details>
<figcaption>
<figure>
<footer>
<header>
<main>
<mark>
<nav>
<section>
<summary>
<time>
4.media element
5.new input attr
color
date
datetime-local
email
month
number
range
search
tel
time
url
week
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input
6.html form
<form action="/action_page.php">
<label for="fname">First name:</label><br>
<input type="text" id="fname" name="fname" value="John"><br>
<label for="lname">Last name:</label><br>
<input type="text" id="lname" name="lname" value="Doe"><br><br>
<input type="submit" value="Submit">
</form>
<form onSubmit={handleSubmit(onSubmit)}> /// react
8.canvas vs svg
Css:
1.position
position: static|absolute|fixed|relative|sticky|initial|
inherit;
static:
o Default value.
o The left, right, top, bottom and z-index properties do not affect
an element with position: static
Relative:
o Elements with position: relative remain in the normal flow of the
document.
o based on the values of left, right, top and bottom properties, is applied
to the element relative to itself.
Absolute:
o Elements with position: absolute are positioned relative to
their parent elements,(if parent are non-static)
o No space is created for the element in the page layout.
o
Fixed
o One thing to note is that fixed elements are not affected by
scrolling. They always stay in the same position on the screen.
o They are also removed from the normal flow of the document
Sticky
o position: sticky is a mix of position:
relative and position: fixed
o acts like a relatively positioned element until a certain scroll
point and then it acts like a fixed element
2.flux
o CSS flexbox layout allows you to easily format HTML and Flexbox makes it simple to
align
o Container:
o flex-direction
o flex-wrap
o flex-flow
o justify-content
o align-items
o align-content
o
3.sudo class & sudo element
Pseudo-Elements
4.block vs inline
o Block element its start in new line also occupies extra space to the
element like: margin
o <div><p>all semantic element
o Inline element take only the element space,
o <span><a><b><button><label>
5.display: none vs visibility: hidden
o None: will take space
o Hidden: will not take space
6.
Sass:
1.advantage
o Nested syntax
o mixins: reusable code @mixes
o variable declaration $primary-color
o https://learning-zone.github.io/css-interview-questions/scss-
questions.html
2.
Excesses :
1.Form
2.make div center
3.float the div (flex)
4.media query
5.optacity
6.
@mixin reset-list {
margin: 0;
padding: 0;
list-style: none;
}
@mixin horizontal-list {
@include reset-list;
li {
display: inline-block;
margin: {
left: -2px;
right: 2em;
}
}
}
nav ul {
@include horizontal-list;
}
Variable :
$base-spacing: 20px !default;
margin-left: $base-spacing
types of style:
Inline CSS.
Internal or Embedded CSS.
External CSS.
display: inline-block allows to set a width and height on the element. Also, with display:
inline-block , the top and bottom margins/paddings are respected, but with display: inline they
are not.