980604-3 An HTML text consists of a text file, consisting of several rows with line breaks (CR, LF or CRLF) between them. Will these line breaks influence how the document ins shown on the screen?

Correct reply

Yes!

  1. In normal mode, line breaks in the transmitted file do not necessarily cause line breaks in the text shown to the recipient, but are rendered as spaces between words (see section 6.2 in the HTML 4 specification),
  2. except that line breaks immediately after a start tag and immediately preceding an end tag are to be ignored (see section B.3.1 in the HTML 4 specification). However, some web browsers do not ignore such line breaks, and render also those line breaks as spaces, so it is not advisable to assume that these linke breaks are ignored.
  3. In <PRE> preformatted mode (see section 9.3.4 in the HTML 4 specification), line breaks in the transmitted file cause line breaks in the screen rendering.

List of exam questions