Questions

HTML questions

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

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.

htmlcssopacity

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.

htmlcsshtml-table

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.

htmlcssheight

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.

htmlcsswidth

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.

htmlbuttonhyperlinkanchor

How to Make the Body Fill the Full Browser Height in CSS

Learn how to make the HTML body fill the full browser height in CSS and avoid white space at the bottom of short pages.

htmlcssheight

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.

htmljavascripturlurl-rewriting

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.

htmljavascriptjquery

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.

htmljavascriptcssanchor

How to Open a Link in a New Tab in HTML

Learn how to open an HTML link in a new tab using target="_blank", plus security tips, examples, and common mistakes.

htmltabshyperlinkwindow

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.

htmlphpxmlxml-parsing

How to Play Audio in JavaScript for HTML5 Games

Learn how to play audio in JavaScript for HTML5 games using the Audio API, events, looping, and practical game-ready examples.

htmljavascripthtml5-audio

How to Prevent Buttons from Submitting Forms in HTML and JavaScript

Learn why buttons submit forms by default and how to stop it using button types, events, and JavaScript in HTML forms.

htmljavascript

How to Prevent Form Submission on Enter in HTML, JavaScript, and jQuery

Learn how to stop forms from submitting when users press Enter using HTML, JavaScript, and jQuery with examples and common pitfalls.

htmljqueryformsform-submit

How to Prevent Parent Collapse with Floated Elements in CSS

Learn why floated children make parent elements collapse in CSS and how to fix it using clearfix, overflow, and modern layout methods.

htmlcsslayoutcss-float

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.

htmlhttp-redirecthtml-meta

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.

htmlsublimetext2sublimetextindentation

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.

htmlcss

How to Right-Align a Flex Item in CSS Flexbox

Learn how to right-align a flex item in CSS Flexbox using auto margins and alignment techniques instead of absolute positioning.

htmlcssflexbox

How to Run JavaScript After Page Load in JavaScript

Learn how to execute JavaScript after HTML loads using DOMContentLoaded, load, and script placement with practical examples.

htmljavascriptdomdom-events

Page 5 of 8 - 152 questions