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

HTML Examples

Last Updated : 17 Jun, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

HTML (Hypertext Markup Language) serves as the backbone of web development, allowing us to create web pages and applications. It uses a diverse range of tags and attributes to define the structure and layout of a web page, thereby facilitating the creation of web pages and applications.

This comprehensive guide’ll delve into practical examples, explore best practices, and unlock the secrets of effective HTML usage. From basic tags to advanced techniques, we’ll equip you with the knowledge needed to craft compelling web experiences. Each program example contains multiple approaches to solve the problem.

HTML Examples

Our HTML examples demonstrate fundamental concepts like tags, attributes, forms, tables, lists, images, links, and multimedia embedding. This knowledge help you to master HTML fundamentals, thereby significantly enhancing your web development skills.

HTML Basic Questions

This section, throws some basic HTML questions your way. Brush up on fundamental concepts like creating elements, adding attributes, and structuring your webpage. Dive in and see how well you understand the building blocks of the web!

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

Dive into these HTML structural tags questions! Test your knowledge on elements like headings, paragraphs, lists, and more, and ensure you're constructing well-organized and semantic webpages.

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?

In this section we have tailored a series of questions designed to assess your understanding of creating and utilizing hyperlinks in HTML. Sharpen your skills in crafting effective navigation elements and ensure your webpages offer a seamless user experience.

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

Need to organize information on your webpage? This section dives into HTML tables! Learn how to create rows, columns, and headers to present data in a clear and structured way, making your webpages easy to understand.

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

This section dives into the world of HTML forms. Learn how to create forms to collect user input, making your webpages interactive and functional. Get ready to build dynamic web experiences!

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

HTML Frames. While not as widely used today, HTML frames can be helpful for understanding older websites and their structure. This section delves into how frames work and how they were used to create webpages in the past.

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

In this section, we explores how to embed multimedia elements like images, videos, and audio into your HTML code. Learn how to control playback, add captions, and create a richer user experience.

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?

HTML Questions

This section offers a variety of questions to challenge your understanding of HTML basics and functionalities. Put your skills to the test and solidify your grasp of building webpages using HTML.

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

Important HTML Reference Links


Similar Reads

three90RightbarBannerImg