You are on page 1of 6

3.

Tag to indicate a navigation section:


HTML (set of navigation links)
<nav>
Example:
1. Include another webpage in your webpage
<nav>
<iframe></iframe> <a href="/html/">HTML</a> |
<a href="/css/">CSS</a> |
Example: <a href="/js/">JavaScript</a> |
<iframe <a href="/python/">Python</a>
src="https://www.youtube.com/embed/eGUEAvNpz48"> </nav>

</iframe>

4. Scroll to a specific element in the linked page:


(URI fragment)

# Followed by the id
Example:
http://www.example.org/foo.html#bar

- The fragment refers to the element with id="bar".


- Graphical Web browsers typically scroll to position pages
so that the top of the element identified by the fragment id
is aligned with the top of the viewport;
2. Tag for styling and structuring without meaning
5. Use tr – td tags only when you want an actual
<div> <span>
table:
Not to create a grid layout
HTML 9. Prevent the browser from auto-filling the inputs:
Autocomplete = "Off"
6. Multiple white spaces next to each other 10. Set input tabbing order:
&nbsp or 'Non breaking space'
Tabindex
7. <strong> vs <b> Input tabbing example

- <b> is only for visuals (make the text bold) 11. Canvas tag:
- <strong> means the text is important: it will affect how
(Draw pixel/bitmap pictures)
search engines and text-to-speech engines read the text.
Example:
8. Meta tag to enable responsive rendering on Mobile:
<canvas id="myCanvas" width="200" height="100"
viewport style="border:1px solid #000000;">
Example: </canvas>
<meta name="viewport" <script>
content="width=device-width, initial-scale=1.0"> var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");

// Create gradient
var grd = ctx.createLinearGradient(0, 0, 200, 0);
grd.addColorStop(0, "red");
grd.addColorStop(1, "white");

// Fill with gradient


ctx.fillStyle = grd;
ctx.fillRect(10, 10, 150, 80);
</script>
CSS Inline styles are
not allowed
7. Difference between block, inline and inline-block:
• Block: elements span the entire width of their parent and
don’t allow other elements on the same row as them.
1. Make rounded-corners: • Inline elements: behave and flow like text:
Border-radius o Their dimensions and margins are defined by their
content and can’t be modified.
2. Two elements have absolute position, to put one on • Inline-block elements: behave and flow like text:
top of the other: o Their dimensions and margins can be modified.
Z-index
Example: 8. Create grid layout:
img { Flex and grid
position: absolute; 9. If two rules conflict with each other:
left: 0px;
top: 0px; Make them more specific and pay attention to rules priorities.
z-index: -1; The single valid reason to use !important keyword.
}
• Override an inline style.
3. Units to use to make an element responsive • Override important styles that comes from external libraries.
% | vh | vmin| vmax | em | rem 10. Give an element max height with scrollbar:
4. Blur an element: set max-height and overflow: auto
Filter: blur(1px) 11. Difference between animation and transition:
5. Apply padding to the inside of a box instead of outside: • Transition: allow for simple transition animation
Box-sizing: border-box. between 2 states.
• Animation: allow for complex animation with multiple
6. Three points at the end of a long text:
frames, timing and multiple transitions.
set overflow: hidden and text-overflow: ellipsis.
JavaScript 4. Callbacks or async functions:
10. Await multiple async functions:
Async functions. push the function call to the end of
the execution queue.
5. Tokens in local storage or cookies:
cookies 11. Difference between var, let
1. Difference between == and ===: and Const:
6. Convert from and to base64:
atob and btoa • Var: It can be declared without
• == is abstract equality: 1 == “1” is true. initialization, updated and re-
• === is strict equality: 1 ===”1” is false 7. Arrow function and Regular declared into the scope.
because the first is a number and the function: • Const: It cannot be updated or
second is a text. • Regular: create a new “this” => can re-declared into the scope. It
In Linq, what is the function that we use to
be used to create a class and access cannot be declared without
2. Difference between for in and for of: check if a collection contains anyting?
the argument object. initialization.
• Arrow: keep the caller “this” => • Let: It can be updated but
• for in: iterate over an object property. cannot be re-declared into the
cannot be used to create a class and
• for of: iterate over an array element. scope. It is a signal that the
cannot access the argument object.
variable may be reassigned,
3. Local storage vs cookie. 8. Run the code in a separate thread: such as a counter in a loop, or a
Web Workers. value swap in an algorithm.
• local storage: for data only accessible in It will be used only in the block
the browser. 9. SetTimeout with 0 milliseconds: it’s defined in.
• cookie: for data accessible in both the push the function call to the end of
browser and the server. the execution queue.
6. Static keyword: 11. Eventually Consistency:
Only for utility methods and extensions, Ensures that any transaction will
never for data. eventually (not immediately) bring
1. Break vs Continue: the database from one valid state to
7. Repository Pattern:
another.
• Break will exit the loop. Repositories are classes or components
This means there can be
• Continue will skip to the next iteration that encapsulate the logic required to
intermediate states that are not
in the loop access data sources.
consistent between multiple nodes.
2. Case Insensitive string comparison: 8. Can an API return a DTO:
Equals(StringComparison.IgnoreCase); An API should only returns DTOs

9. CORS:
3. Get a single record from an EF:
Command query responsibility
First-Find-Single
segregation is a pattern that treats
4. Register a class that will should be retrieving data and changing data
created once per request in ASP.NET Core differently.
dependency injection?: The read model should be different than
AddScoped the command model
10. Event Bus:
5. Create an Enum that can hold multiple Allows different services to
values at once: communicate with each other without
[Flags] attribute knowing about each other using events.
5. Standard Authentication library for ASP.Net
core:
Microsoft Identity
7. Disadvantages of integer keys:
Security, someone can guess the next
record key
8. Index:
1. What is a Transaction: Retrieve data from a large database
It gives us the ability to safely perform very fast
multiple SQL queries without allowing
other contexts to modify the data while
the
transaction is running.
2. When to use a Transaction:
When we want to ensure the a set of
queries get executed together or fail
together.
3. Eliminate duplicate records from
the results of a select query:
Distinct.
4. Disadvantages of transactions:
Performance.
5. Advantages of stored procedures:
Performance.

You might also like