Functions dense in $L^1[0,1]$ but not in $L^2[0,1]$ Is there a family of continuous functions $(f_n)_{n \in \mathbb{N}}$ on $[0,1]$ whose span is dense in $L^1[0,1]$ for the $L^1$-norm, but not dense in $L^2[0,1]$ for the $L^2$-norm?

Some preliminary considerations: I suspect the answer is yes, since there exist a family of $L^2$ functions dense in $L^1$ but not in $L^2$. See my answer to Completeness of $\{ f_n : n \in \mathbb N \} \subset C[0,1]$ in $L^1[0,1]$ that uses the general [Müntz-theorem in $L^p$ spaces (see Borwein and Erdélyi - The full Müntz Theorem in $C[0,1]$ and $L^1[0,1]$): for $p=1, 2$ and distinct $\lambda_i > -\frac{1}{p}$,
$$\text{the space $\operatorname{Span}(1, x^{\lambda_1}, x^{\lambda_2}, \dotsc)$ is dense in $L^p[0,1]\ \ $ iff $\ \ \sum \limits_{i=1}^{\infty}  \frac{\lambda_i + 1/p}{(\lambda_i + 1/p)^2 + 1} = \infty$.}$$
We can take $\lambda_i = \frac{-1}{2} + \frac{1}{i^2}$ to have the sum diverge for $p=1$ and converge for $p=2$.
For the continuous case however, the Müntz theorem means it's useless to look for a family $(f_n)$ in the form of power functions. Also, any suitable candidate obviously cannot have a dense span in $\mathcal{C}[0,1]$, which rules out the usual suspects. I think any approach to construct dense families in $L^p[0,1]$ spaces without directly relying on the density of polynomials in $\mathcal{C}[0,1]$ could be useful to study, but I haven't found any.
 A: $\newcommand{\ep}{\varepsilon}$User Z. M provided an elegant and brief (and yet complete) detailization of Fedor Petrov's comment.
Here is another detailization, which is pedestrian but explicit.
Let $F:=\{f_1,f_2,\dotsc\}$ be any countable subset of $C[0,1]$, which is dense in $C[0,1]$ with respect (w.r.) to the norm $\lVert\cdot\rVert_\infty$. For instance, $F$ can be the set of all polynomials with rational coefficients. Then $F$ is also dense in $C[0,1]$ w.r. to the norm $\lVert\cdot\rVert_1$. So, $F$ is dense in $L^1[0,1]$ w.r. to the norm $\lVert\cdot\rVert_1$.
Let $h(x):=x^{-1/3}$. Then $h\in L^2[0,1]$.
For each natural $n$, we can change the function $f_n$ to a function $g_n\in C[0,1]$ such that
$g_n$ is orthogonal to $h$ and yet $\lVert g_n-f_n\rVert_1\le1/n$, for all $n$ — so that $g_n$ differs little from $f_n$ in $L^1$ if $n$ is large. Then clearly the set $G:=\{g_1,g_2,\dotsc\}$ will be dense in $L^1[0,1]$, but even the span of $G$ will not be dense in $L^2[0,1]$.
Indeed, let
\begin{equation*}
    g_n(x):=
    \begin{cases}f_n(x)&\text{ if }\ep_n\le x\le1, \\ 
    f_n(\ep_n)-c_n(\ep_n-x)&\text{ if }0\le x<\ep_n,
\end{cases}
\tag{1}\label{-1}
\end{equation*}
where
\begin{equation*}
    c_n:=\frac{I_n+f_n(\ep_n)\frac32\,\ep_n^{2/3}}{J_n}=\frac{10}9\,(I_n\ep_n^{-5/3}
    +\tfrac32\,f_n(\ep_n)\ep_n^{-1}),  
    \tag{2}\label{0}
\end{equation*}
\begin{equation*}
    I_n:=\int_{\ep_n}^1 f_n h, 
\end{equation*}
\begin{equation*}
    J_n=\int_0^{\ep_n}dx\,(\ep_n-x)h(x)
    =\frac9{10}\,\ep_n^{5/3},
\end{equation*}
and $\ep_n\in(0,1)$ is small enough so that
\begin{equation*}
    \int_0^{\ep_n} |f_n|\, +\, \|f_n\|_\infty\, \ep_n
    +\frac59\,(\|f_n\|_2\,\sqrt 3\,\ep_n^{1/3}+\tfrac32\,\|f_n\|_\infty\,\ep_n)
    \le\frac1n. \tag{3}\label{1}
\end{equation*}
Then $g_n\in C[0,1]$,
\begin{equation*}
\begin{aligned}
    \lVert g_n-f_n\rVert_1&\le\int_0^{\ep_n}dx\,(\lvert f_n(x)\rvert+\lvert f_n(\ep_n)\rvert+\lvert c_n\rvert(\ep_n-x)) \\ 
    &\le\int_0^{\ep_n} \lvert f_n\rvert + \lVert f_n\rVert_\infty\, \ep_n + \lvert c_n\rvert \ep_n^2/2. 
\end{aligned}
\tag{4}\label{2}
\end{equation*}
Next, $\lvert I_n\rvert\le\lVert f_n\rVert_2\lVert h\rVert_2=\lVert f_n\rVert_2\,\sqrt3$ and hence, by \eqref{0},
\begin{equation*}
    \lvert c_n\rvert\ep_n^2/2\le\frac59\,(\lVert f_n\rVert_2\,\sqrt3\,\ep_n^{1/3}+\tfrac32\,\lVert f_n\rVert_\infty\,\ep_n).  
\end{equation*}
Thus, by \eqref{2} and \eqref{1}, $\lVert g_n-f_n\rVert_1\le1/n$.
Also, by \eqref{-1} and \eqref{0}, $\int_0^1 g_n h=0$,
as claimed.
