Clients and servers know HTML and HTTP

HTML

When a server answers a request, the server usually sends some type of content to the browser so that the browser can display it. Servers often send the browser a set of instructions written in HTML, the HyperText Markup Language. The HTML tells the browser how to present the content to the user.

All web browsers know what to do with HTML, although sometimes an older browser might not understand parts of a page that was written using newer versions of HTML.

image with no caption

HTML tells the browser how to display the content to the user.

HTTP

Most of the conversations held on the web between clients and servers are held using the HTTP protocol, which allows for simple request and response conversations. The client sends an HTTP request, and the server answers with an HTTP response. Bottom line: if you’re a web server, you speak HTTP.

When a web server sends an HTML page to the client, it sends it using HTTP. (You’ll see the details on how all this works in the next few pages.)

(FYI: HTTP stands for HyperText Transfer Protocol.)

HTTP is the protocol clients and servers use on the web to communicate.

The server uses HTTP to send HTML to the client.

Get Head First Servlets and JSP, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.