Web browser (source code)

= Web browser

A <web browser> retrieves and presents web resources while providing an environment for interaction with them. For an <HTML> page, this includes parsing source into a <Document Object Model>, applying <CSS>, laying out the result and rendering it. Programs such as <JavaScript> can then change the document or respond to user actions.<HTML Standard by WHATWG>[Introduction, web platform scope and quick HTML example; document processing and scripting model]{ref}

Consider a page containing `<p id="notice">Waiting</p>`. Its visible word begins as Waiting. A program can obtain that element and change its text to Ready; the <Document Object Model> and displayed page then change without requiring the original response bytes to change. The browser maintains a live document and rendering state, rather than repeatedly displaying an immutable picture of the source.

The visible area also has several coordinate scales. The <layout viewport> constrains layout, while the <visual viewport> describes the portion being viewed. <Page zoom>, <pinch zoom> and scrolling can change those relationships. This matters when a program places a label relative to a document element or interprets a pointer position.<CSSOM View Module by World Wide Web Consortium>[Viewports, Zooming and the VisualViewport interface]{ref}

A <URL> identifies a resource to navigate to; a <web search engine> helps discover resources. A browser can present search results as a page, but navigating directly to a known address does not require a search query. The retrieval service and the software interpreting its pages remain separate parts of the system.