Questions

HTML questions

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

Can You Style Half a Character in CSS? Text Effects with CSS and JavaScript

Learn how to style half of a character using CSS and JavaScript, including overlay techniques for dynamic text effects.

htmljavascriptcss

Get Screen, Page, and Browser Window Size in JavaScript

Learn how to get screen size, viewport size, page size, and scroll position in JavaScript across major browsers.

htmljavascriptjquerylayout

Get the Selected Radio Button Value with jQuery

Learn how to find which radio button is selected in jQuery and get its value with simple examples and common mistakes.

htmljavascriptjqueryjquery-selectors

HTML id Attribute Rules: Valid Values and Best Practices

Learn which HTML id values are valid, how browsers treat them, and the best practices for naming ids in modern HTML and CSS.

html

HTML5 Void Elements: Should You Use <br>, <br/>, or <br />?

Learn the correct HTML5 syntax for void elements like <br> and when <br/> or <br /> matters in HTML vs XHTML.

html

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 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 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 Create a Placeholder for a Select Box in HTML and CSS

Learn how to create a placeholder-like option for a select box using HTML, CSS, and JavaScript, with beginner-friendly examples.

htmlcsshtml-selectplaceholder

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.

htmlformsbrowserautocomplete

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.

htmlcssresizetextarea

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.

htmljavascriptcssdom

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.

htmlcssalignmentcentering

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 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

Page 1 of 2 - 31 questions

PreviousNext