I changed a little of one of the pictures in your link so you see those $x_1, x_2, \dots, x_n$ and their corresponding $y$-values $f_1=f(x_1), f_2=f(x_2),\dots, f_n=f(x_n)$:
$ in the interval $[a,b].$ Now if $w_1=(b-a)/(n-1), w_2=(b-a)/(n-1), \dots, w_{n-1}=(b-a)/(n-1), w_n=0$, we get $$\frac{b-a}{n-1}(f_1+\cdots+f_{n-1}),$$ which is the sum of the area of the rectangles using the height of the left boundaries. Notice that $(b-a)/(n-1)$ is the width of each rectangle.
Otherwise, if $w_1=0, w_2=(b-a)/(n-1), \dots, w_{n-1}=(b-a)/(n-1), w_n=(b-a)/(n-1)$, we get $$\frac{b-a}{n-1}(f_2+\cdots+f_{n}),$$ which is the sum of the area of the rectangles using the height of the right boundaries.
The integration quadrature is a generalization of this idea, with different weights on different $y$-values.