DAY 1
DAY 2
A semantic element clearly describes its meaning to both the browser and the developer.
Examples of non-semantic elements: <div> and <span> - Tells nothing about its content.
Examples of semantic elements: <img>, <table>, and <article> - Clearly defines its content.
<!DOCTYPE html> <html> <head> <title>HTML iframe Tag</title> </head> <body style="text-align: center"> <h2>HTML iframe Tag</h2> <iframe src= "https://media.geeksforgeeks.org/wp-content/uploads/20240206111438/uni2.html" height="370" width="400"> </iframe> </body> </html>
<p style="color:#009900; font-size:50px; font-style:italic; text-align:center;"> Inline CSS </p>
<!DOCTYPE html> <html> <head> <style> .main { text-align: center; } .GFG { color: #009900; font-size: 50px; font-weight: bold; } .geeks { font-style: bold; font-size: 20px; } </style> </head> <body> <div class="main"> <div class="GFG">Internal CSS</div> <div class="geeks"> Implementation of Internal CSS </div> </div> </body> </html>
<!DOCTYPE html> <html> <head> <link rel="stylesheet" href="style.css"> </head> <body> <div class="main"> <div class="GFG">External CSS </div> <div id="geeks"> This shows implementation of External CSS </div> </div> </body> </html>
body { background-color: powderblue; } .main { text-align: center; } .GFG { color: #009900; font-size: 50px; font-weight: bold; } #geeks { font-style: bold; font-size: 20px; }
HTML elements can be categorized into different types based on their purpose and behavior. Here’s a list of various types of HTML elements:
1. Document Structure Elements
These elements define the overall structure of the HTML document.
<html>– Root element of the HTML document<head>– Contains metadata, title, links, etc.<body>– Contains the main content of the document<title>– Defines the document’s title in the browser tab<meta>– Provides metadata such as character encoding, viewport settings
2. Text Content Elements
These elements structure and format text content.
<h1>to<h6>– Headings (largest to smallest)<p>– Paragraph<br>– Line break<hr>– Horizontal line<blockquote>– Block-level quotation<pre>– Preformatted text<code>– Inline code<samp>– Sample output<kbd>– Keyboard input<var>– Variable in a program
3. Formatting Elements
These elements provide emphasis and styling to text.
<strong>– Important text (bold by default)<em>– Emphasized text (italic by default)<mark>– Highlighted text<del>– Strikethrough text<ins>– Underlined text<sup>– Superscript text<sub>– Subscript text<abbr>– Abbreviation with a tooltip<cite>– Citation reference<dfn>– Definition term
4. List Elements
These elements are used to create lists.
<ul>– Unordered list<ol>– Ordered list<li>– List item<dl>– Description list<dt>– Description term<dd>– Description definition
5. Link and Navigation Elements
These elements help with navigation and linking.
<a>– Hyperlink<nav>– Navigation section<link>– External resource link (like stylesheets)
6. Image and Media Elements
These elements embed media content.
<img>– Image<figure>– Groups media and captions<figcaption>– Caption for a<figure><audio>– Audio file<video>– Video file<source>– Specifies media sources<track>– Subtitles/captions for videos<embed>– Embeds external content
7. Table Elements
These elements create tables.
<table>– Table<tr>– Table row<th>– Table header cell<td>– Table data cell<caption>– Table caption<thead>– Table head<tbody>– Table body<tfoot>– Table footer
8. Form Elements
These elements allow user input.
<form>– Defines a form<input>– Input field<label>– Label for an input<textarea>– Multi-line text input<button>– Clickable button<select>– Dropdown selection<option>– Option in a dropdown<fieldset>– Groups form elements<legend>– Title for a fieldset<datalist>– Provides predefined input suggestions<output>– Displays calculation results
9. Interactive Elements
These elements add interactive features.
<details>– Expandable/collapsible content<summary>– Summary for<details><dialog>– Modal dialog box<progress>– Progress bar<meter>– Measurement within a range
10. Embedded and External Elements
These elements embed external content.
<iframe>– Embeds another webpage<object>– Embeds media, like PDFs<param>– Parameters for<object>
11. Semantic Elements
These elements provide meaningful structure.
<header>– Page or section header<footer>– Page or section footer<main>– Main content of the page<article>– Independent, self-contained content<section>– Thematic section of content<aside>– Sidebar content<address>– Contact information<time>– Represents a time or date
12. Metadata and Scripting Elements
These elements define metadata or scripts.
<script>– JavaScript code<noscript>– Alternative content when JavaScript is disabled<style>– Internal CSS styles<base>– Specifies the base URL for links
This covers almost all major HTML elements categorized by type. Let me know if you need more details or specific examples!


It was awesome to read, thanks for sharing
ReplyDeleteGCP DevOps Certification Training
GCP DevOps Training
GCP DevOps Online Training
DevOps GCP Online Training in Hyderabad
GCP DevOps Online Training Institute
GCP DevOps Training in Chennai
GCP DevOps Online Training in Bangalore
GCP DevOps Certification Course in India
GCP DevOps Online Training Institute in Bangalore
Super Article.Thanks for sharing this post
ReplyDeleteAws AI Course
Aws AI Certification
"Aws AI Training In Hyderabad
Aws AI Online Training
AI With Aws Online Training
AI With Aws Online Training Course
AI With Aws Training Online
AI With Aws Online Training Hyderabad
AI With Aws Training
Ai With Aws Training Course in Chennai
Ai With Aws Online Training Bangalore
Ai With Aws Online Training India
Super Article.Thanks for sharing this post
ReplyDeleteAws AI Course
Aws AI Certification
"Aws AI Training In Hyderabad
Aws AI Online Training
AI With Aws Online Training
AI With Aws Online Training Course
AI With Aws Training Online
AI With Aws Online Training Hyderabad
AI With Aws Training
Ai With Aws Training Course in Chennai
Ai With Aws Online Training Bangalore
Ai With Aws Online Training India