1
00:00:00,360 --> 00:00:01,680
Welcome back.

2
00:00:01,710 --> 00:00:05,960
In this video, let's talk about selectors.

3
00:00:05,970 --> 00:00:12,200
When it comes to Dom, we are not going to write well Dom code.

4
00:00:12,210 --> 00:00:20,070
So the first step is we need know some methods in the DOM that's going to help us to select pieces of

5
00:00:20,070 --> 00:00:24,270
the DOM that we want to use JavaScript to select.

6
00:00:24,510 --> 00:00:27,780
To better understand Dom, this is the first step.

7
00:00:27,780 --> 00:00:35,310
We need to know how we can select or how you can select using these selectors.

8
00:00:35,490 --> 00:00:39,300
So for DOM selectors we have two types.

9
00:00:39,300 --> 00:00:46,420
One is single selectors and other one is called the multiple selectors grid.

10
00:00:46,500 --> 00:00:57,000
And for single selectors we have one get element by ID, the next one is called query selector.

11
00:00:57,480 --> 00:01:04,170
These two selectors are commonly used to take note about this perfect.

12
00:01:04,170 --> 00:01:10,590
So apart from single selectors you have an example of the multiple selectors.

13
00:01:10,680 --> 00:01:16,050
An example is called Get Elements by tag name.

14
00:01:16,380 --> 00:01:22,920
When we say single selectors, first is select only one element in the page.

15
00:01:23,590 --> 00:01:31,000
So for multiple selectors, a select multiple elements and put them in an array.

16
00:01:31,330 --> 00:01:37,570
So an example of the multiple selectors is called Get Element by tag name.

17
00:01:37,990 --> 00:01:45,220
It simply means that if elements, let's say we have five elements with the same type name, we can

18
00:01:45,220 --> 00:01:48,420
use this selector to select all of them.

19
00:01:48,430 --> 00:01:54,790
And apart from that, we can also use get elements by class name.

20
00:01:55,120 --> 00:02:00,260
You would have even more to explain with code, all these concepts.

21
00:02:00,280 --> 00:02:06,640
And apart from that, you also use what is called get elements by name.

22
00:02:07,300 --> 00:02:18,640
The next one is called query selector or for the multiple selectors, query selector or is commonly

23
00:02:18,640 --> 00:02:19,260
used.

24
00:02:19,270 --> 00:02:25,780
So among these selectors we are going to use this ones and this one.

25
00:02:25,780 --> 00:02:27,920
So pay attention to this.

26
00:02:27,940 --> 00:02:34,390
So the difference is, is that see that here we have query selector and this one is called query selector

27
00:02:34,390 --> 00:02:44,260
or like I said for single selector is a select one element and for multiple is select multiple element.

28
00:02:44,410 --> 00:02:45,700
The next video.

29
00:02:45,730 --> 00:02:53,560
Let's see how we can use these selectors to select element in our page so that we can use JavaScript

30
00:02:53,560 --> 00:02:55,470
to add content to read.

