Step functions on $[a,b]$ are dense in $\mathcal C^0([a,b])$. 
Let $\|f \|=\sup_{[a,b]}|f|$. We consider ($\mathcal C^0([a,b]),\|\cdot \|)$ and $(\mathcal E([a,b]),\|\cdot \|)$ where $\mathcal E([a,b])$ is a set of the step functions on $[a,b]$. I have to show that $\mathcal E([a,b])$ is dense in $\mathcal C^0([a,b])$. 

There is my proof:
Let $f\in\mathcal C^0([a,b])$ and $\varepsilon>0$. Since $f$ is continuous on $[a,b]$ it's also uniformly continuous and thus, there is a $\delta>0$ s.t. $|f(x)-f(y)|<\varepsilon$ for all $x,y\in[a,b]$ s.t. $|x-y|<\delta$. Let $a=x_0<x_1<...<x_n=b$ such that $x_{i+1}-x_i<\delta$ for all $i$. We set $\varphi(x)=f(x_i)$ for all $i=0,...,n-1$ and $\varphi(x_n)=f(x_n)$. Therefore, if $x\in[a,b[$, there is a $i$ such that $x_i\leq x<x_{i+1}$ and thus $$|f(x)-\varphi(x)|=|f(x)-\varphi(x_i)|<\varepsilon$$ since $|x-x_i|<\delta$. Finally, since $f(b)=\varphi(b)$ we get that 
$$\forall x\in[a,b], |f(x)-\varphi(x)|<\varepsilon$$
and thus $$\|f-\varphi\|=\sup_{[a,b]}|f-\varphi|<\varepsilon$$
what prove the claim.
Q1) Is it correct ?
Q2) Something is strange to me. If $A$ is dense in $B$, in particular $A\subset B$, but here, how can $\mathcal E([a,b])\subset \mathcal C^0([a,b])$ since an element of $\mathcal E([a,b])$ is not necessarily continuous ? 

Regarding your question 2, $\mathcal C^0([a,b])$ is a subspace of the vectorial space $\mathcal F([a,b])$ of the real function defined on $[a,b]$. $\mathcal E([a,b])$ is also a subspace of $\mathcal F([a,b])$.
This is why you can say that $\mathcal E([a,b])$ is dense in $\mathcal C^0([a,b])$.
However, you're right, the formal definition of density is defined for subspaces.
