-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_Queries.txt
58 lines (41 loc) · 2.72 KB
/
_Queries.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
!! Questions : (* marked implying unresolved issues)
Q.1> My browser may not support each and every type of file. Then how to resolve that issue while creating a generic web page for everyone.
-> One solution is to convert those file formats into more popular and standard file formats before using in your webpage.
Q.2> How to calculate "specificity" numerically ?
-> To calculate specificity, assign a value to each part of the selector:
Universal Selector: 0
Element selectors and pseudo-elements: 1
Class selectors, attribute selectors, and pseudo-classes: 10
ID selectors: 100
Inline styles: 1000
An !important at the end of a CSS value gets a specificity score of 10,000 points.
Then, add up the values of all the parts in the selector(for complex selectors).
e.g. <h1 id="title" class="h1">CodeWithHarry</h1>
Here, the specificity value will be 111 because ID has a specificity of 100, the class has a specificity of 10, and the h1 element has a specificity of 1.
In the case of a specificity tie, the rule that appears last in the CSS is applied.
Q.3> What will be the specificity value of the following selector:
a.harryclass.rohan-class[href]:hover {
color: red;
}
-> To calculate the specificity value of the selector "a.harryclass.rohan-class[href]:hover", you can break down its components:
Element selectors: "a" contributes 1 point.
Class selectors: ".harryclass" and ".rohan-class" each contributes 10 points, totaling 20 points.
Attribute selector: "[href]" contributes 10 points.
Pseudo-class: ":hover" adds another 10 points.
Add up all these values:
1 (element) + 20 (classes) + 10 (attribute) + 10 (pseudo-class) = 41.
So, the specificity value of the selector "a.harryclass.rohan-class[href]:hover" will be 41.
*Q.4> What are "-webkit-..." properties and why are they used ?
*Q.5> "for each" loop in JS ?
*Q.6> Know when we shouldn't use "eval" in JS while working on a serios website
!! Suggestions :
S.1> "right click -> view page source" to watch the web page's sourse code.
S.2> "ctrl + enter" -> will take your cursor to the exact next line with the same indentation of the previous line
irrespective of whereever you were in the previous line.
S.3> "windows + shift + s" -> to open the snipping tool
S.4> "windows + alt + r" -> screen recording
S.5> "windows + h" -> audio text writing
S.6> "windows + d" -> to close and open all the tabs together
S.7> "windows + tab" -> to get the view of all the opened app
S.8> "alt + tab" -> to open the last opened tab
S.9> Now-a-days JS is tremendously used to create S-A-A-S products which stands for "Software As A Service"