The flagella and pili are similar in that they are both composed of proteins. <span>Flagella is made up of protein flagellin, while pili is composed of protein pilin. Both flagella and pili are tubular hollow, filamentous structures of bacteria. Both extend from the surface of the bacterial wall.</span>