Article Title
This is a blog post inside <article>.
These elements form the basic structure of an HTML document and provide metadata about the page.
Description: Defines HTML5 document type so browsers know how to render the page.
Example: <!DOCTYPE html>
is written at the top of every HTML document.
Description: Root element that contains the whole HTML page.
Example: This entire document is wrapped inside <html>
.
Description: Holds metadata, links, title, and scripts for the page.
Example: This demo's CSS and JavaScript are inside the <head>
.
Description: Sets the title of the page (shown in browser tab).
Example: Current page title is "HTML Elements Demo".
Description: Provides metadata like character encoding and viewport.
Example: <meta charset="UTF-8">
Description: Defines a base URL for all relative links.
Example: If you write <a href="page.html">
, it will point to https://example.com/page.html
.
Description: Links external resources like CSS or icons.
Example: <link rel="stylesheet" href="style.css">
Description: Lets you write internal CSS rules.
Example: The white boxes on this page are styled using <style>
.
Description: Used to include JavaScript code or external JS files.
Example: Open console to see message from <script>
.
Description: Provides fallback content if JavaScript is disabled.
Example: If JS is off, you'll see a warning message.
These elements help organize content into logical sections and provide structure to the document.
This is inside a <header> element.
This is the <main> content of the page.
Latest updates are shown here.
This is a blog post inside <article>.
These elements are used for formatting and structuring text content within HTML documents.
This is a paragraph using the <p> tag.
This word is red using <span>.
This text has bold, italic, emphasized, and strong text.
This text is highlighted.
Abbreviation: WHO
Normal text smaller note.
Mathematical expressions: x2 + y2 and H2O
Deleted text and inserted text
Quote: This is a short quotation
This is a famous quote written inside <blockquote>.
Citation: Hamlet by Shakespeare
Definition: HTML is HyperText Markup Language.
Keyboard input: Press Ctrl + C to copy.
Sample output: File not found
Variable: x + y = 10
Meeting scheduled for .
Code example: <html>
element
This is preformatted text with preserved spacing and line breaks
Line breaks:
This text is on
multiple lines
A longwordthatmight
Thematic break above
These elements are used for creating lists and tabular data structures.
Name | Marks |
---|---|
Sara | 95 |
Ali | 85 |
End of Table |
These elements are used to create interactive forms for collecting user input.
These elements are used for embedding multimedia content such as images, audio, and video.
Audio element would appear here with controls
Video element would appear here with controls
Embedded content would appear here
Object content would appear here
Track element for subtitles would appear here
These elements provide additional meaning to content and create interactive components.
This content is hidden by default and revealed when the summary is clicked.
Meeting scheduled for .
Contact information:
Written by John DoeCitation: The Great Gatsby by F. Scott Fitzgerald
Code example: console.log("Hello");
Line 1 Indented Line 2 Line 3
Keyboard input: Press Ctrl + C to copy.
Sample output: Error: File not found
Variable: x + y = 10
Terms and conditions apply
Subscript and superscript: H2O and x2
My favorite color is blue green.
He said, Hello there!
"The journey of a thousand miles begins with a single step."
This text is right-to-left
These elements are no longer recommended for use in modern HTML and have been replaced by CSS or other elements.
Warning: These elements are deprecated and should not be used in new projects.
Note: Most deprecated elements have been replaced by CSS for styling purposes.
Use this HTML compiler to practice writing HTML code. Type your HTML code in the editor on the left and see the live preview on the right.