Address Line 1 usually identifies the primary street address. Address Line 2 can hold additional delivery details, such as an apartment or suite. The exact split depends on the destination and receiving system: two generic text boxes are not a universal postal format.

A simple fictional example

FieldTest value
Address Line 142 Example Street
Address Line 2Apt 5B

This invented example tests how fields are stored; it is not a mailing address. Keep city, region, postcode and country in their own fields when the destination system supports them.

What if there is no second line?

For a simple street-address test, submit an empty second line and reopen the record. It should remain empty rather than becoming the literal text “undefined” or “null”. Check the rendered summary for an extra comma, blank label or duplicated street. Avoid adding filler merely to make the form pass.

Test more than the visible form

Enter the example, save it, edit the apartment, then inspect the checkout summary and exported record. A frequent integration failure is retaining the apartment in the browser while omitting it from an API payload. Another is appending the apartment on every save, producing repeated values after a second edit.

Label the fields for the browser

For separate address-line inputs, HTML provides address-line1 and address-line2 autocomplete tokens. Match those hints to the information each field actually accepts. Test autofill separately from manual typing because browser behavior can differ.

Start with the US address generator, then add explicit apartment and empty-line cases to your own test set. Generated records are synthetic and do not establish deliverability.

Reference

MDN: HTML autocomplete tokens