In MathJax, math does not automatically break to fit a window; scrollbars appear as needed.

MathJax does not support line breaks within inline math.
If required, you can end math mode and put in an explicit break, like this:

$123$<br />$abc$
yields:

$123$
$abc$

In display mode, you can use all the normal multi-line constructs (e.g.,  gather  and  align ).

Example:
$$
\text{The first quick brown fox jumps over the lazy dog.
The second quick brown fox jumps over the lazy dog.
The third quick brown fox jumps over the lazy dog.
The fourth quick brown fox jumps over the lazy dog.
}
$$
yields

$$\text{The first quick brown fox jumps over the lazy dog. The second quick brown fox jumps over the lazy dog. The third quick brown fox jumps over the lazy dog. The fourth quick brown fox jumps over the lazy dog. } $$

Example:

$
a1 b1 c1 d1 e1 f1 g1 h1 i1 j1 k1 l1 m1 n1 o1 p1 q1 r1 s1 t1 u1 v1 w1 x1 y1 z1
a2 b2 c2 d2 e2 f2 g2 h2 i2 j2 k2 l2 m2 n2 o2 p2 q2 r2 s2 t2 u2 v2 w2 x2 y2 z2
$
yields

$ a1 b1 c1 d1 e1 f1 g1 h1 i1 j1 k1 l1 m1 n1 o1 p1 q1 r1 s1 t1 u1 v1 w1 x1 y1 z1 a2 b2 c2 d2 e2 f2 g2 h2 i2 j2 k2 l2 m2 n2 o2 p2 q2 r2 s2 t2 u2 v2 w2 x2 y2 z2 $