Questions
HTML questions
Choose a question page, learn the concept, then test your understanding with a quiz.
How to Disable Browser Autocomplete on Form Inputs in HTML
Learn how browser autocomplete works in HTML forms, when `autocomplete="off"` helps, and the limits across major browsers.
How to Disable Textarea Resizing in CSS
Learn how to disable the resizable property of a textarea using CSS. See syntax, examples, common mistakes, and practical use cases.
How to Embed a PDF in HTML: iframe vs object vs embed
Learn the recommended ways to embed a PDF in HTML using iframe, object, and embed, with examples, fallbacks, and browser support tips.
How to Get the Selected Option from a Dropdown in jQuery
Learn how to get the selected dropdown value or text in jQuery, why .val() works, and common mistakes with select elements.
How to Get the X and Y Position of an HTML Element in JavaScript
Learn how to get an element's X and Y position in JavaScript using getBoundingClientRect, offsets, and scroll-aware approaches.
How to Hide the Scrollbar While Keeping Scrolling in CSS
Learn how to hide scrollbars while preserving scrolling using CSS in Chrome, Firefox, and older Edge/IE browsers.
How to Horizontally Center a div in CSS
Learn how to horizontally center a div in CSS using margin auto, flexbox, and other common layout techniques with simple examples.
How to Maintain a Div Aspect Ratio with CSS
Learn how to keep a div responsive while preserving its aspect ratio using pure CSS, with modern and fallback techniques.
How to Make Only the Background Transparent in CSS
Learn how to make a CSS background semi-transparent without affecting text or images using RGBA, pseudo-elements, and modern CSS patterns.
How to Make a Div Fill Remaining Height in CSS
Learn how to make a content div fill the remaining screen height below a variable-height header using modern CSS layouts.
How to Make a Div Fill the Browser Height in CSS
Learn how to make a div fill 100% of the browser window using CSS with height, min-height, and viewport units.
How to Make a div Fit Its Contents in CSS
Learn how to make a div only as wide as its content using CSS display rules, shrink-to-fit behavior, and practical layout examples.
How to Make an HTML Button Act Like a Link
Learn the accessible way to make an HTML button act like a link in HTML, including when to use links vs buttons and common mistakes.
How to Modify the URL Without Reloading the Page in JavaScript
Learn how to change the browser URL without reloading the page using JavaScript History API and hash updates.
How to Move a DOM Element Into Another Element in JavaScript
Learn how to move a DIV into another element in JavaScript using DOM methods like appendChild and append.
How to Offset HTML Anchors for a Fixed Header Using CSS and JavaScript
Learn how to offset in-page HTML anchors for fixed headers using CSS scroll-margin, pseudo-elements, and JavaScript fallbacks.
How to Parse and Process HTML/XML in PHP
Learn how to parse HTML and XML in PHP, extract data safely, and choose between DOMDocument, SimpleXML, and XPath.
How to Redirect One HTML Page to Another on Load in HTML and JavaScript
Learn how to redirect one HTML page to another on load using HTML and JavaScript, with examples, pitfalls, and real-world usage.
How to Reformat HTML in Sublime Text 2
Learn how to reformat and prettify HTML in Sublime Text 2 using packages, indentation tools, and practical formatting workflows.
How to Remove Bullets from an Unordered List in CSS
Learn how to remove bullets from an unordered list using CSS, with simple examples, common mistakes, and practical usage tips.