- HTML, which stands for HyperText Markup Language, is the standard language used to create and design web pages and web applications. It consists of a series of elements or tags that tell web browsers how to display content. HTML elements can include headings, paragraphs, images, links, and many other types of content.
- Each HTML document begins with a `<!DOCTYPE html>` declaration, indicating that the document is an HTML5 document. The content of the document is enclosed within `<html>` tags, with the head and body sections split into `<head>` and `<body>` tags, respectively.
- The `<head>` section contains meta-information about the document, such as its title and links to stylesheets.
- The `<body>` section contains the actual content that will be displayed on the web page, such as text, images, and links.
<!DOCTYPE html>
<html>
<head>
<title>My First HTML Page</title>
</head>
<body>
<h1>Hello, World!</h1>
<p>This is my first web page. I'm learning HTML!</p>
<a href="https://example.com">Click here to visit example.com</a>
</body>
</html>
In this example:
- `<!DOCTYPE html>` declares the document type.
- `<html>` surrounds the entire document.
- `<head>` contains the document's metadata, like its title.
- `<title>` sets the title of the web page, which appears in the browser's title bar or tab.
- `<body>` contains the content of the page, including:
- `<h1>` for a top-level heading,
- `<p>` for paragraphs, and
- `<a href="https://example.com">` for a hyperlink to another web page.
- HTML is a cornerstone technology of the web, used alongside CSS (Cascading Style Sheets) for styling and JavaScript for functionality, forming the triad of foundational technologies for the World Wide Web.
No comments:
Post a Comment