The Wayback Machine - https://web.archive.org/web/20250124120654/https://www.geeksforgeeks.org/html-examples/
Open In App

HTML Examples

Last Updated : 10 Jan, 2025
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

HTML (HyperText Markup Language) is the backbone of the web, providing the structural foundation for websites. Whether you're a beginner learning the basics or an experienced developer seeking quick references, examples are the most effective way to understand HTML concepts in action.

In this article, we’ve categorized all essential HTML concepts and provided practical examples for each, helping you grasp how these elements function in real-world scenarios.

In this article, we provide a one-off basic example of each and every concept of HTML with proper explanation.

HTML Examples

Note: For Pratice you can use our GFG Online HTML Editor because it's simple and easy to use.

HTML Basic Examples

Sr. No.

Questions

1Difference between HTML and CSS
2What are physical tags in HTML?
3What are Deprecated Tags?
4Container and Empty Tags in HTML
5How to insert HTML Comments?
6How to set background image in HTML?
7How to define a list item in HTML5?
8Difference between semantic and non-semantic elements
9How to use HTML Color Picker?
10What are HTML Hex Color Codes?
11Difference between Block and Inline Elements
12What is the Drag and Drop concept?
13How to set the name for the object in HTML5?
14How to add space between elements?
15How to create a clickable button in HTML?
16How to display incorrect content using HTML5?
17How to create an ordered list using HTML5?
18How to add a parent to several tags in HTML?
19How to specify the alignment of the Horizontal rule using HTML5?
20What’s the difference between element value and data attribute?

HTML Structural Tags

Sr. No.

Questions

1How to escape everything in a block in HTML?
2How to center a div within another div?
3How to rotate an HTML div element 90 degrees?
4How to create a moving div?
5How to stretch div to fit the container?
6Make a div horizontally scrollable using CSS
7How to hide text going beyond DIV element?
8How to set an alternate text for area in HTML5?
9How to read all spans of a div dynamically?
10How to create horizontal scrollable sections using CSS?

Sr. No.

Questions

1What are HTML Links?
2How to link back out of a folder using the a-href tag?
3What is HTML <a> ping Attribute?
4HTML <link> disabled attribute
5What is the use of “#” symbol in link URL?
6How to create a link with a media attribute in HTML5?
7How to specify the source URL of the quote using HTML5?
8How to specify that the target will be downloaded when a user clicks on the hyperlink in HTML5?
9How to specify the hyperlink target for the area of an image in HTML5?
10How to make a HTML link that forces refresh?
11How to specify the relationship between the current document and the target URL in HTML5?
12How to set the language of text in the linked document in HTML5?
13How to specify what media/device the target URL is optimized for?
14How to specify URL of resource to be used by the object in HTML5?
15How to use Anchor tag as submit button?
16How to set the size of the linked resource in HTML5?
17How to insert a JavaScript variable inside href attribute?

HTML Tables

Sr. No.

Questions

1What are HTML Tables?
2What is <td> nowrap Attribute?
3What is tbody charoff Attribute?
4What is <tr> charoff Attribute?
5What is <td> scope Attribute?
6What is <td> rowspan Attribute?
7What is <col> valign Attribute?
8What is <thead> align Attribute?
9What is <thead> valign Attribute?
10How to define whether a header cell is a header for a column, row, or group of columns or rows in HTML 5?
11How to group header content of a table using HTML5?
12How to implement single row select and delete using DataTables plugin?
13How to define one or more header cells a cell is related to in HTML?
14How to set the number of rows a table cell should span in HTML?
15How to create a table with fixed header and scrollable body?
16How to make a Animated Table using HTML and CSS?

HTML Forms

Sr. No.

Questions

1Elements of a form Tag
2How to set an alternate text for area in HTML5?
3How to specify one or more forms the object belongs to?
4How to specify one or more forms the keygen element belongs to?
5How to turn on/off form autocompletion in HTML?
6How to customize a “select” HTML form element ?
7How to specify that a group of related form elements should be disabled using HTML?
8How to specify how form-data should be encoded when submitting to server?
9How to specify the URL that will process the data supplied through input(s) when the form is submitted?
10How to specify one or more forms the label belongs to?
11How to specify multiple forms the select field belongs to in HTML?
12How to set an alternate text for area in HTML5?
13How to change the <input> type?
14How to specify which form element a label is bound to?
15How to create a multiline input control text area in HTML5?
16How to define one or more forms the output element belongs to?
17Build a Survey Form using HTML and CSS
18How to create form validation by using only HTML?

HTML Frames

Sr. No.

Questions

1HTML Iframes
2What is HTML <iframe> referrerpolicy Attribute?
3How to divide an HTML page into four parts using frames?
4How to place a div inside an iframe for IE?
5How to enable extra set of restrictions for content in an iframe element in HTML5?
6How to navigate URL in an iframe with JavaScript?

HTML Media

Sr. No.

Questions

1HTML Emojis
2How to set width and height of background image in percent with respect to parent element in CSS?
3How to slice image specified by border-image-source in CSS?
4How to animate a straight line in linear motion?
5How to specify the media type of the script in HTML5?
6How to display video controls in HTML5?
7How to mute video using HTML5?
8How to add controls to an audio in HTML5?
9Create Scanning Animation Loader using HTML & CSS
10How to specify media type of data specified in data attribute in HTML5?
11How to set the height and width of the video player in HTML5?
12How to specify what media/device the target URL is optimized for?
13How to specify the type of the media resource in HTML5?
14How to preload the video when the page loads in HTML5?
15How to check whether an image is loaded or not?
16How to Create Image Hovered Detail using HTML & CSS?
17How to define media type of style tag in HTML5?
18How to set multiple media resources for elements in HTML5?

Practical HTML Examples

Sr. No.

Questions

1How to set a single line break in HTML5?
2How to set two bars with rounded arrows overlapping each other in CSS?
3How to create a progress bar using HTML and CSS?
4How to set the content as a counter?
5How to create Perspective Text using HTML & CSS?
6How to set an alternate text for area in HTML5?
7How to isolate a part of text that may be formatted in a different direction using HTML5?
8Design an Event Webpage using HTML & CSS
9How to create fullscreen search bar using HTML, CSS and JavaScript?
10How to Skew Text on Hover using HTML and CSS?
11Programming a slideshow with HTML and CSS
12How to specify that an option-group should be disabled in HTML5?
13How to specify the name for drop-down list in HTML5?
14How to disable the drop-down list in HTML5?
15How to specify how much work the task requires in total in HTML5?
16How to create Non-Rectangular Header using HTML & CSS?
17How to define scalar measurement within a given range in HTML5?
18How to set the security algorithm of key in HTML5?
19How to set minimum and maximum value of range in HTML5?
20Turn on or off Bulb using HTML & CSS

Similar Reads

three90RightbarBannerImg