Interview_quick_Notes_for_HTML_Javascript_CSS_Python_1664021144
Interview_quick_Notes_for_HTML_Javascript_CSS_Python_1664021144
HTML HTML5
Older version of HTML is less mobile HTML5 language is more mobile
friendly. friendly.
No audio/video support in HTML. Audio/ video elements can be
integrated directly onto a webpage.
It doesn’t support all web browsers. It is supported by all major web
browsers.
It doesn’t allow JavaScript to run in It allows JavaScript to run in
browser. background.
3
What is the difference between Canvas and SVG?
Canvas SVG
It is resolution dependent. It is resolution independent.
No support for event handlers. Support for event handlers.
2D graphics using JavaScript. 2D graphics in XML.
Poor rendering capabilities. It is suited for applications with large
rendering.
Advantages:
• Design websites faster and easier.
• Fully customizable and light weight.
• It has big community and friendly support, highest templates. Short
development time and feature rich core.
Import:
• Using content delivery network (CDN).
• Downloading files locally.
• Using package managers to import bootstrap to HTML.
To insert an image:
Copy the URL and open your index.html file.
Insert it into img code. i.e., <img src=”url”>
Semantic tags- clearly defines its content. They have specific attributes for their
structure. Ex: <nav>, <header>, <footer>, <table>, <section>
5
Non-Semantic tags- tells nothing about its content. Class attributes can be used for
their structure. Ex: <div>, <span>
Block elements always starts on a new line. It takes up the full width available.
It has a top and a bottom margin, where inline element doesn’t. Ex: <div>,
<header>, <p>, <section>, <ul>, <li>, <hr>
6
CSS
.selector {
Property name1: value1;
Property name2: value2;
}
Define CSS selectors and its types?
CSS selectors are used to select the HTML elements you want to style. Types
of selectors – Simplex, complex, compound.
The class selector selects the HTML elements with a specific class attribute, and it
is denoted in “.” Period character.
Universal selector selects all HTML elements on the page. It is denoted by “*”.
Element selector selects HTML elements based on the element name.
7
It consists of margins, borders, padding, and the actual content.
Content: The content of the box, where text and images appear.
Padding: Clears an area around the content. The padding is transparent.
Border: A border that goes around the padding and content.
Margin: Clears an area outside the border. The margin is transparent.
Media types describe the general category of devices (screen, print, tv, all).
Media features:
Width, min-width, max-width.
Height, min-height, max-height.
Orientation – landscape(W>H), portrait(H>W).
9
Define CSS transforms and methods.
CSS transforms allows you to move, rotate, scale, skew elements.
2D transformation methods: translate (), rotate (), scale x(), scale y(), skew(),
matrix().
3D transformation methods: rotate x(), rotate y(), rotate z().
10
JavaScript
“let” allows you to declare variables that are limited to the scope of a block
statement, or expression on which it is used, unlike the var keyword, which
declares a variable globally, or locally to an entire function regardless of block
scope. const can’t be changed.
11
What is DOM?
DOM – Document Object Model is the structured representation of the HTML
document created by the browser. It allows JavaScript to manipulate, structure
and style your website.
Define Events.
Events are the actions by which the user or browser interacts with HTML
elements. Actions can be like clicking a button, pressing on keyboard keys scrolling
the page, etc.
The data type is the form of a variable to which a value can be assigned. It
defines that the variable will assign the values of the given data type only. Data
type examples are number, string, boolean, etc.
What is Hoisting?
Hoisting in JavaScript is a behavior in which a function or variable can be used
before declaration. Ex: x=8;
console.log(x);
var x; //display 8
What is Scope?
Scope determined the accessibility of variables. Types of scopes – Block, Function,
Global.
12
What is Array?
An Array holds an ordered sequence of items.
Ex: const profile = [“Emp1”,” Emp2”,” Emp3”];
Methods: pop, push, shift, unshift, splice, join, sort, concat.
What is an Object?
In JavaScript, an object is an unordered collection of key-value pairs. Each keyvalue
pair is called a property. Object values should be functions, array, object.
Methods:
setItem() – can be used to storing data in the local storage. getItem() – can
be used to get the data from the local storage. clear() – clears the data.
removeItem() – removes the specified storage object item based on the key.
JSON Methods:
JSON.stringify() – converts the given value into JSON string.
JSON.parse() – parse a JSON string and returns JS object.
13
Define Function and types.
In JavaScript, A function is defined as a set of statements that performs a task and
executed when it is called or invoked.
There are 3 types of writing a function in JS – Function Declaration, Function
Expression, Arrow Function.
Function Declaration is start declaring using the keyword “function” and then
write function name, parameters. Ex: function add(a,b) {
console.log(a+b);
}
add(5,10);
Function Expression define a function using a variable and stored the return value
in that variable.
Ex: const add = function(a,b) {
console.log(a+b);
}
add(5,10);
Arrow Function is introduced with ES6 version of JS. It uses arrow symbol only, not
function keyword. Ex: let add = (a+b) => a+b;
console.log(add(5,10));
14
What are HTTP Requests?
An HTTP request is made by a client, to a named host, which is located on a server.
The aim of the request is to access a resource on the server.
15
Python
16
What is PEP 8?
PEP- Python Enhancement Proposal. PEP 8 is a coding convention, a set of
recommendation, about how to write your Python code more readable.
17
How does break, continue, and pass work?
Python break: This statement helps terminate the loop or the statement and pass
the control to the next statement.
Python continue: This statement helps force the execution of the next iteration
when a specific condition meets, instead of terminating it.
Python pass: This statement helps write the code syntactically and wants to skip
the execution. It is also considered a null operation as nothing happens when you
execute the pass statement.
18
SQL
What is SQL?
o SQL Stands for structured query language.
o This database language is mainly designed for maintaining the data in
relational database management systems. o SQL is the standard language
for accessing and manipulating databases.
19
DDL – Data Definition Language: o It is used to change the structure of the table
like creating table, altering the table and deleting the table.
o All the commands in the DDL are auto committed that means it permanently
saves all the changes in the database.
TRUNCATE: This command is used to remove all rows from a table. It is similar to
DELETE statement with No WHERE clause.
Syntax:
TRUNCATE TABLE EMPLOYEE;
20
DML – Data Manipulation Language:
• DML commands are used to modify the database. It is responsible for all
form of changes in the database.
• The command of DML is not auto committed that means it can't
permanently save all the changes in the database. They can be rollback.
UPDATE: This command is used to update or modify the value of a column in the
table.
Syntax:
UPDATE students
SET User_Name = 'Sonoo'
WHERE Student_Id = '3'
DCL - Data Control Language: DCL commands are used to grant and take back
authority from any database user.
Grant: It is used to give user access privileges to a database.
21
Syntax:
GRANT SELECT, UPDATE ON MY_TABLE TO SOME_USER, ANOTHER_USER;
COMMIT: Commit command is used to save all the transactions to the database.
Syntax:
DELETE FROM CUSTOMERS
WHERE AGE = 25;
COMMIT;
ROLLBACK: Rollback command is used to undo transactions that have not already
been saved to the database. Syntax:
DELETE FROM CUSTOMERS
WHERE AGE = 25;
ROLLBACK;
SAVEPOINT: It is used to roll the transaction back to a certain point without rolling
back the entire transaction.
Syntax: SAVEPOINT SAVEPOINT_NAME;
22
DQL - Data Query Language: DQL is used to fetch the data from the database.
Syntax:
SELECT emp_name
FROM employee
WHERE age > 20;
23
What are constraints in SQL?
Constraints are used to specify the rules concerning data in the table. It can be
applied for single or multiple fields in an SQL table during the creation of the table
or after creating using the ALTER TABLE command. The constraints are:
• NOT NULL - Restricts NULL value from being inserted into a column.
• CHECK - Verifies that all values in a field satisfy a condition.
• DEFAULT - Automatically assigns a default value if no value has been
specified for the field.
• UNIQUE - Ensures unique values to be inserted into the field.
• INDEX - Indexes a field providing faster retrieval of records.
• PRIMARY KEY - Uniquely identifies each record in a table.
• FOREIGN KEY - Ensures referential integrity for a record in another table.
24
What are ACID properties?
Atomicity: The entire transactions take place at once or doesn’t happen at all.
Consistency: The database must be consistent before and after the transaction.
Isolation: Multiple transactions occur independently without interference.
Durability: The changes of a successful transaction occurs even if the system
failure.
25
React JS
What is JSX?
JSX is a XML-like syntax extension to ECMAScript (the acronym stands for
JavaScript XML). JSX stands for JavaScript XML. JSX allows us to write HTML in
React. JSX makes it easier to write and add HTML in React.
Define Redux.
Redux is a library used for frontend. It is a state container for JavaScript
applications which should be used for the applications state management. You can
test and run the application in different environments.
27
Resume
28
For more updates or info, you can follow me
LinkedIn: Sravan Kumar
29