Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

HTML, or Hypertext Markup Language, is the standard language for creating web pages.

It uses
markup tags to structure content such as text, images, links, and other elements within a web
page.

Example:
```html
<!DOCTYPE html>
<html>
<head>
<title>My First Web Page</title>
</head>
<body>
<h1>Welcome to My Website!</h1>
<p>This is a paragraph of text.</p>
<img src=”example.jpg” alt=”Example Image”>
<a href=https://www.example.com>Visit Example Website</a>
</body>
</html>```
In this example:
- `<!DOCTYPE html>` declares the document type and version of HTML.
- `<html>` is the root element that wraps all content.
- `<head>` contains meta-information about the document, like the title.
- `<title>` sets the title displayed in the browser’s title bar.
- `<body>` contains the visible content of the web page.
- `<h1>` is a heading tag.
- `<p>` is a paragraph tag.
- `<img>` embeds an image, with the `src` attribute specifying the image file and `alt`
providing alternative text.
- `<a>` creates a hyperlink, with the `href` attribute specifying the URL to link to.
HTTP, or Hypertext Transfer Protocol, is the underlying protocol used for communication
between web servers and web clients (such as web browsers). It defines how messages are
formatted and transmitted, as well as how web servers and browsers should respond to various
commands.
Example:

```
GET /index.html HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/96.0.4664.110 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/
apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Accept-Language: en-US,en;q=0.9
```
In this example:

- `GET` is the HTTP method, indicating that the client is requesting a resource from the
server.

- `/index.html` is the path of the resource being requested.


- `HTTP/1.1` is the version of the HTTP protocol being used.
- `Host: www.example.com` specifies the host (domain name) of the server.
- `User-Agent` provides information about the client making the request, typically the web
browser being used.
- `Accept` indicates the types of content the client can accept
- `Accept-Language` specifies the preferred language for the response.

You might also like