<!-- !
HTML -->
Full Form of HTML: Hypertext Markup Language
Hypertext
- Hypertext refers to text that contains links (called hyperlinks) to other
texts or documents.
- meaning users can jump from one document to another simply by clicking on
hyperlinks.
Markup
- Markup refers to the way tags are used to define the structure and
presentation of content in a document.
- The markup does not display directly on the webpage; instead, it instructs
the browser on how to render the content.
For example, the <h1> tag defines the main heading.
<!--! Tags In HTML-->
Notes on HTML Tags
1. What Are HTML Tags?
- Tags are predefined keywords in HTML that are enclosed in angular braces ( <
>).
- Each tag has a specific purpose and used for, determining how content
within the tag is displayed or behaves on the webpage.
2. Syntax of HTML Tags
- The general syntax for HTML tags is as follows:
<tagname> content </tagname>
- Example:
- <p> Hello world </p>
- <b> Hello world </b>
3. Types of HTML Tags
HTML tags are categorized into two types:
1. Paired Tags
- Definition: Paired tags require both an opening tag and a closing tag.
- Syntax: The closing tag is similar to the opening tag but includes a
forward slash (/).
- Example:
<p> Hello Web Dev </p>
- Explanation: In this example, <p> is the opening tag, and </p> is the
closing tag.
2. Unpaired Tags
- Definition: Unpaired tags, also known as self-closing tags, do not
require a closing tag.
- Example: <br> , <hr>, <input>
<!-- ! Structure Of HTML -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>introduction</title>
</head>
<body>
<h1> hello everyone, welcome to webtech class ....</h1>
</body>
</html>
1. <!DOCTYPE html>
- The <!DOCTYPE html> declaration is the very first line in an HTML document.
- Purpose: It tells the web browser which version of HTML the document is
written in.
- For modern HTML documents, use <!DOCTYPE html> to specify HTML5, the latest
standard.
2. <html>
- The <html> element is the root of an HTML document and contains all other
elements.
- Attributes: Typically includes the lang attribute to specify the language
of the document (e.g., lang="en" for English).
3. <head>
- The <head> section contains meta-information about the document, which is
not displayed directly on the webpage.
- Key Elements in the Head Section:
- <meta charset="UTF-8">: Specifies the character encoding for the
document, ensuring that text is displayed correctly.
- <title>: Sets the title of the webpage, which appears in the browser tab.
- <meta name="viewport">: Ensures the page is responsive and displays
correctly on different devices.
4. <body>
- The <body> section contains the content that is displayed on the webpage,
including text, images, links, and other elements.