We wish to understand how organ-specific structures assemble during embryonic development. In the present paper, we consider what determines the subapical position of the terminal web in the intestinal cells of the nematode Caenorhabditis elegans. The terminal web refers to the organelle-depleted, intermediate filament-rich layer of cytoplasm that underlies the apical microvilli of polarized epithelial cells. It is generally regarded as the anchor for actin rootlets protruding from the microvillar cores. We demonstrate that: (i) the widely used monoclonal antibody MH33 reacts (only) with the gut-specific intermediate filament protein encoded by the ifb-2 gene; (ii) IFB-2 protein accumulates near the gut lumen beginning at the lima bean stage of embryogenesis and remains associated with the gut lumen into adulthood; and (iii) as revealed by immunoelectron microscopy, IFB-2 protein is confined to a discrete circumferential subapical layer within the intestinal terminal web (known in nematodes as the "endotube"); this layer joins directly to the apical junction complexes that connect adjacent gut cells. To investigate what determines the disposition of the IFB-2-containing structure as the terminal web assembles during development, RNAi was used to remove the functions of gene products previously shown to be involved in the overall apicobasal polarity of the developing gut cell. Removal of dlg-1, ajm-1, or hmp-1 function has little effect on the overall position or continuity of the terminal web IFB-2-containing layer. In contrast, removal of the function of the let-413 gene leads to a basolateral expansion of the terminal web, to the point where it can now extend around the entire circumference of the gut cell. The same treatment also leads to concordant basolateral expansion of both gut cell cortical actin and the actin-associated protein ERM-1. LET-413 has previously been shown to be basolaterally located and to prevent the basolateral expansion of several individual apical proteins. In the present context, we conclude that LET-413 is also necessary to maintain the entire terminal web or brush border assembly at the apical surface of C. elegans gut cells, a dramatic example of the so-called "fence" function ascribed to epithelial cell junctions. On the other hand, LET-413 is not necessary to establish this apical location during early development. Finally, the distance at which the terminal web intermediate filament layer lies beneath the gut cell surface (both apical and basolateral) must be determined independently of apical junction position.