In Michael Spivak's Calculus (fourth edition), he proves that if $f$ is continuous on $[a,b]$, then it is integrable on $[a,b]$. Here is an extract from the proof (page 266, chapter 13). (See the screenshot below for an explanation of the notation.)
Notice, first, that $f$ is bounded on $[a,b]$, because it is continuous on $[a,b]$. To prove that $f$ is integrable on $[a,b]$, we want to show that for every $\varepsilon>0$ there is a partition $P$ of $[a,b]$ such that $$ U(f,P)-L(f,P)<\varepsilon \, . $$ Since $f$ is continuous on $[a,b]$, it is uniformly continuous on $[a,b]$, and so there is some $\delta>0$ such that for all $x$ and $y$ in $[a,b]$, $$ |x-y|<\delta\implies|f(x)-f(y)|<\frac{\varepsilon}{2(b-a)} \tag{1}\label{1} \, . $$ The trick is simply to choose a partition $P=\{t_0,\dots,t_n\}$ such that each $|t_i-t_{I-1}|<\delta$. Then for each $i$ we have $$ \forall x,y\in[t_{i-1},t_i]:|f(x)-f(y)|<\frac{\varepsilon}{2(b-a)} \, , $$ and it follows easily that $$ M_i-m_i\le\frac{\varepsilon}{2(b-a)}<\frac{\varepsilon}{b-a} \tag{2}\label{2}\, . $$
So far, I think I understand the proof: if $x,y\in[t_{i-1},t_i]$, then $|x-y|\le|t_i-t_{i-1}|<\delta$, and so $|f(x)-f(y)|<\frac{\varepsilon}{2(b-a)}$. However, why does the first inequality on line $\eqref{2}$ have to be non-strict? Since $f$ is continuous on $[a,b]$, shouldn't there be numbers $x,y\in[t_{i-1},t_i]$ such that $f(x)=M_i$ and $f(y)=m_i$? Then, using $\eqref{1}$, $$ |f(x)-f(y)|=|M_i-m_i|=M_i-m_i\color{red}{<}\frac{\varepsilon}{2(b-a)} \, . $$ If my line of reasoning is correct, then we could simplify the proof a little by noting that $$ |x-y|<\delta\implies|f(x)-f(y)|<\frac{\varepsilon}{b-a} \, , $$ and so $$ M_i-m_i<\frac{\varepsilon}{b-a} \, . $$
Notation explanation: