<html>Example:
<html lang="en">
<head>Example:
<head><meta charset="UTF-8"></head>
<title>Example:
<title>My Web Page</title>
<body>Example:
<body>Welcome to my website</body>
<h1>...</h1>Example:
<h1>Main Title</h1>
<p>Example:
<p>This is a paragraph.</p>
<a href="url">Example:
<a href="https://www.example.com">Click Here</a>
<img src="image.jpg" alt="description">Example:
<img src="logo.png" alt="Website Logo">
<div>Example:
<div class="container">Content Here</div>
<span>Example:
<span style="color:red">Important Text</span>
<ul>Example:
<ul><li>Item 1</li><li>Item 2</li></ul>
<ol>Example:
<ol><li>First</li><li>Second</li></ol>
<li>Example:
<li>List Item</li>
<form>Example:
<form action="/submit"></form>
<input type="text">Example:
<input type="text" name="username">
<button>Click me</button>Example:
<button type="submit">Submit</button>
<link rel="stylesheet" href="style.css">Example:
<link rel="stylesheet" href="style.css">
<meta charset="UTF-8">Example:
<meta name="description" content="This is a website">
<script>Example:
<script src="script.js"></script>
<style>Example:
<style> body { background-color: #f0f0f0; } </style>
<br>Example:
Line 1<br>Line 2
<hr>Example:
<hr>
<iframe src="url">Example:
<iframe src="https://www.example.com"></iframe>
<strong>Example:
<strong>This text is bold.</strong>
<em>Example:
<em>This text is italic.</em>
<code>Example:
<code>var x = 10;</code>
<kbd>Example:
<kbd>Ctrl+C</kbd>
<samp>Example:
<samp>Error: Invalid Input</samp>
<cite>Example:
<cite>The Great Gatsby</cite>
<q>Example:
<q>This is a quote.</q>
<blockquote>Example:
<blockquote>This is a blockquote.</blockquote>
<address>Example:
<address>John Doe, 123 Street, City</address>
<audio>Example:
<audio controls><source src="audio.mp3" type="audio/mp3"></audio>
<video>Example:
<video controls><source src="video.mp4" type="video/mp4"></video>
<canvas>Example:
<canvas id="myCanvas"></canvas>
<noscript>Example:
<noscript>JavaScript is required to view this page.</noscript>
<template>Example:
<template><div>This is a template</div></template>
<track>Example:
<track src="subtitles_en.vtt" kind="subtitles" srclang="en" label="English">
<source>Example:
<source src="movie.mp4" type="video/mp4">
<figure>Example:
<figure><img src="image.jpg"><figcaption>A beautiful scenery</figcaption></figure>
<details>Example:
<details><summary>More Info</summary>Detailed content here</details>
<summary>Example:
<summary>Click to reveal more</summary>
<mark>Example:
<mark>Highlighted text</mark>
<progress>Example:
<progress value="50" max="100">
<meter>Example:
<meter value="70" min="0" max="100">
<output>Example:
<output>Result: 15</output>
<ruby>Example:
<ruby>漢字<rt>Kanji</rt></ruby>
<rt>Example:
<rt>Kanji</rt>
<rp>Example:
<rp>( </rp><rt>Kanji</rt><rp> )</rp>
<wbr>Example:
This is a long word with<wbr>possible line break.
What is an HTML tag?
An HTML tag is a code used to define the structure of content in a webpage. It is enclosed in angle brackets, such as <tag>. Tags usually come in pairs: an opening tag and a closing tag, like <h1> and </h1>.
What is the difference between <div> and <span>?
The <div> tag is a block-level element used to group larger sections of content, while the <span> tag is an inline element used to style a specific portion of content within a block-level element. The <div> tag takes up the full width available, while the <span> tag only takes up as much width as its content requires.
What are attributes in HTML?
Attributes in HTML provide additional information about an element. They are placed within the opening tag and are typically in the form of a name-value pair, such as src="image.jpg" in an image tag: <img src="image.jpg">. Common attributes include href for links, alt for image descriptions, and class for styling.
How do I add an image in HTML?
To add an image, use the <img> tag and specify the src attribute to define the image file location. Example: <img src="image.jpg" alt="Description">. The alt attribute provides a description for the image for accessibility purposes.
What is the purpose of the <meta> tag?
The <meta> tag provides metadata about the HTML document, such as its character encoding, description, keywords, and author. It is placed in the <head> section of the document. Example: <meta charset="UTF-8">.
What is the <a> tag used for?
The <a> tag is used to create hyperlinks in an HTML document. It requires the href attribute to specify the destination URL. Example: <a href="https://www.example.com">Visit Example</a>.
How do I add a form in HTML?
To add a form, use the <form> tag. Forms can include various input elements like <input> for text fields, <button> for buttons, and <select> for dropdowns. Example: <form action="/submit"><input type="text"></form>.
What is the difference between <div> and <section>?
The <div> tag is a generic container used to group content, while <section> is a semantic tag used to define a specific section of content with its own heading. <section> is used to organize content that is thematically related.
Can I use CSS inside an HTML document?
Yes, you can include CSS inside an HTML document using the <style> tag in the <head> section. Example: <style>body {background-color: lightblue;} </style>. Alternatively, you can link to an external CSS file using the <link> tag.