Questions

HTML questions

Choose a question page, learn the concept, then test your understanding with a quiz.

Handle Multiple Submit Buttons in ASP.NET MVC with C#

Learn how to handle multiple submit buttons in one ASP.NET MVC form using named button values, controller branching, and validation patterns.

htmlcsharpasp.net-mvchttp-post

Hide a Scrollbar with CSS: Options, Accessibility, and Examples

Learn how to hide page and container scrollbars with CSS while preserving scrolling, including cross-browser rules and accessibility guidance.

htmlcssbrowserscrollbar

Hide an Element When Clicking Outside in jQuery

Learn how to hide a div when clicking outside it in jQuery without breaking links or button clicks inside the element.

htmljqueryhidestyling

How In-Browser Screenshots Work with HTML5 Canvas and JavaScript

Learn how browsers create in-page screenshot tools with JavaScript and Canvas, including limits, selection overlays, and practical alternatives.

htmljavascriptcanvasscreenshot

How `vertical-align` Works in CSS for Text Next to Images

Learn why `vertical-align: middle` may not work next to an image in CSS, how inline alignment works, and practical fixes for text-image layout.

htmlcssalignmentvertical-alignment

How to Add a Class to an HTML Element with JavaScript

Learn how to add a CSS class to an HTML element in JavaScript using classList.add, with examples, mistakes, and real use cases.

htmljavascriptdom-manipulation

How to Add a Favicon in HTML for Browser Tabs

Learn how to add a favicon to a website using HTML, choose PNG or ICO formats, place the tag in the head, and avoid browser caching issues.

htmliconsfavicon

How to Align Checkbox and Label Text Consistently Across Browsers with CSS

Learn reliable ways to align checkbox inputs and labels across browsers using simple HTML and CSS techniques.

htmlcsscross-browseralignment

How to Align Content to the Bottom of a Div in CSS

Learn how to bottom-align content inside a fixed-height div using CSS with simple examples, flexbox, positioning, and common mistakes.

htmlcssvertical-alignment

How to Allow Only Numeric Input in HTML and JavaScript

Learn how to allow only numeric input in HTML text fields, including decimals, validation, and safer alternatives for real forms.

htmljavascriptjquery

How to Auto-Resize an Image While Maintaining Aspect Ratio in CSS

Learn how to resize images to fit a container while keeping aspect ratio using CSS. Includes examples, mistakes, and a mini project.

htmlcssimageaspect-ratio

How to Center Items Horizontally and Vertically with Flexbox in CSS

Learn how to center elements horizontally and vertically with CSS Flexbox, including stacked rows, alignment rules, and common mistakes.

htmlcssflexbox

How to Center a div Horizontally in CSS

Learn how to horizontally center a fixed-width div in CSS using margin auto, with examples, mistakes, and practical layout tips.

htmlcssalignmentcenter

How to Change Placeholder Text Color in CSS

Learn how to style HTML input placeholder text with CSS using ::placeholder and browser-specific selectors.

htmlcssplaceholderhtml-input

How to Change an Element's Class with JavaScript

Learn how to change, add, remove, and toggle HTML element classes with JavaScript using events like click.

htmljavascriptdom

How to Change an HR Element Color with CSS

Learn why the CSS color property may not change an hr line and use border or background styles to create colored horizontal rules.

htmlcss

How to Change the href Attribute with jQuery

Learn how to change a hyperlink's href attribute using jQuery with clear examples, common mistakes, and practical use cases.

htmljavascriptjqueryhyperlink

How to Check If a DOM Element Is Visible in the Viewport in JavaScript

Learn how to detect whether a DOM element is visible in the current viewport using JavaScript, with examples and common pitfalls.

htmljavascriptfirefoxdom

How to Check Whether an Element Has a Class in JavaScript

Learn how to check if a DOM element has a class in JavaScript using classList.contains(), with examples, mistakes, and practical use cases.

htmljavascriptcssdom

How to Clear an HTML Canvas for Redrawing in JavaScript

Learn how to clear an HTML canvas for redrawing in JavaScript using clearRect, resizing, and common redraw patterns.

htmljavascriptcanvashtml5-canvas

Page 3 of 8 - 152 questions