HTML (HyperText Markup Language) is a language used to create web pages. It is a markup language, which means it uses a set of tags to define elements within a document. These tags are enclosed in angle brackets, and can include attributes that provide additional information about the element.
Here are some common HTML tags and their uses:
<html> - This tag is used to define the beginning of an HTML document.
<html>
<!-- Content goes here -->
</html>
<head> - This tag is used to define the header section of an HTML document, which typically includes metadata and links to external resources.
<head>
<meta charset="UTF-8">
<title>My Website</title>
<link rel="stylesheet" href="style.css">
</head>
<body> - This tag is used to define the main content area of an HTML document.
<body>
<h1>Welcome to My Website</h1>
<p>This is some sample text.</p>
</body>
<h1> to <h6> - These tags are used to define headings of different sizes, with <h1> being the largest and <h6> being the smallest.
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
<h5>Heading 5</h5>
<h6>Heading 6</h6>
<p> - This tag is used to define a paragraph of text.
<p>This is a paragraph of text.</p>
<a> - This tag is used to define a hyperlink, which allows the user to navigate to another web page or location.
<a href="https://www.example.com">Click here</a>
<img> - This tag is used to insert an image into an HTML document, with the src attribute specifying the location of the image file.
<img src="image.jpg" alt="A picture of something">
<ul> and <li> - These tags are used to create an unordered list of items.
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
<ol> and <li> - These tags are used to create an ordered list of items.
<ol>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
</ol>
<table> and related tags - These tags are used to create a table of data, with <tr> defining a table row, <th> defining a table header cell, and <td> defining a table data cell.
<table>
<tr>
<th>Header 1</th>
<th>Header 2</th>
</tr>
<tr>
<td>Data 1</td>
<td>Data 2</td>
</tr>
</table>
These are just a few of the many tags and attributes available in HTML. By combining them in different ways, you can create complex and dynamic web pages.
No comments:
Post a Comment