This is a survey article concerning some recent mathematical results for the static selfdual cosmic-string solutions in the Abelian Higgs model and in the Weinberg-Salam standard model unifying electromagnetic and weak interactions, both coupled with gravity through the Einstein equations. For the Abelian Higgs strings there is a nearly complete picture. If the Riemann surface M on which the strings reside is compact, it can be shown that M must be S2 up to topological equivalence and there are only countably many values of the Higgs vacuum states for strings to exist. When M is noncompact and conformally a plane there are exact obstructions to the finiteness of energies and geodesic completeness of solutions. For the Weinberg-Salam strings, much is to be achieved. It can be shown in this case that self-dual strings generated from W and Higgs condensation lead to an explicit formula for a positive cosmological constant and the gravitational metric is always noncomplete. This feature leads to the properties that the metric decays sufficiently rapidly at infinity and there exist non-Abelian electroweak strings of finite energies. It is established that for any integer N there are always suitable ranges of the electroweak parameters to allow the existence of W- and Higgs-condensed N-vortex solutions of finite energies.