Snippets tagged “html”
245 snippets use this tag.
- Form Validation Using JavaScriptJavaScript
Incorrect information leads to bad user interactions. So as to prevent this problem, read and learn how to validate forms with the help of JavaScript!
- How can I select and upload multiple files with HTML and PHP, using HTTP POST?PHP
You can use the following HTML code to create a form that allows users to select and upload multiple files.
- How can I view/open a word document in my browser using with PHP or HTMLPHP
You can use the PHP function readfile() to read the contents of a Word document and then use the appropriate headers to prompt the browser to open or download the file.
- How do I add PHP code/file to HTML(.html) files?PHP
To add PHP code to an HTML file, you will need to use PHP tags.
- How Not to Wrap the Contents of <p>, <div>, and <span> ElementsHTML
In this snippet, we want to demonstrate how you can make the contents of the <p>, <div>, and <span> elements not to wrap. Use the CSS white-space property.
- How to Add a Blur Filter to the Background ImageCSS
Learn How to Apply a Blur Filter to a Background Image with W3docs tutorial. Follow up the steps and create a blurred background image for your website.
- How to Add a Border Inside the TableHTML
Read this snippet if you have faced the difficulty of setting a border inside the table. In this tutorial, we suggest two methods of overcoming this problem.
- How to Add a Border-Bottom to the Table RowHTML
In this tutorial, we want to demonstrate how you can add a border only to the bottom of the table row. Read and find out what CSS property you need for this.
- How to Add a Fade out Text Effect with CSSCSS
If you want to use beautiful effects for texts and make your Website more eye-catching, read our snippet, try examples and learn to create fade out text effect.
- How to Add a Glass Background Effect to the TextCSS
If you want to make your website eye-catching and creative read this snippet and learn to create a glass background effect for your text step by step.
- How to Add a Mouseover Text with HTMLHTML
In this tutorial, find out how to create a mouseover text description without Javascript. Use the HTML <div> or <span> element with the “title” attribute.
- How to add a print button to a web pagePHP
To add a print button to a web page using PHP, you can use the following steps:
- How to Add a Text on the HTML5 <canvas> ElementCSS
In this tutorial, you’ll find out how to add text on the HTML5 <canvas> element. For that, you need Javascript. Use the fillText() and strokeText() methods.
- How to Add a Vertical Line in HTMLHTML
In this snippet, we’ll show how to add a vertical line on the left and right sides, as well as how to center it and how to add a vertical line before a text.
- How to Add an Anchor Link to Jump to a Specific Part of a PageHTML
Learn how to create an anchor link to jump to a specific section of a page, and how to link to the anchor from another webpage. Also see how to style the jumping anchor link with examples.
- How to Add an Animated Text Over an Image on Hover With CSS3CSS
Know how to put an animated text over a faded image on hover using only CSS3. For that purpose, use the transition and the opacity properties. See examples!
- How to Add an HTML Button that Acts Like a LinkHTML
There are several ways to place a clickable button on a webpage that will be linked to another page of your website. You can add inline onclick event to HTML button tag, or input tag.
- How to Add an Onclick Effect with HTML and CSSHTML
In this snippet, we’ll demonstrate how to add an onclick event in CSS. The best way of creating an onclick effect is using the well-known checkbox hack.
- How to Add and Use CSS CommentsCSS
A CSS comment is used to give explanatory information to the code or to prevent the browser from trying to interpret particular parts of the style sheet.
- How to Add Background Image with CSSCSS
To add background image to your HTML document you should use CSS styles.
- How to Add Border Inside a DivHTML
If you need to place a border inside a <div> element, you are in the right place. In this snippet, you can find out how to do it using some CSS properties.
- How to Add Border to HTML TableHTML
Learn how to create an HTML table, how to change HTML table border style using CSS. How to add border to<div>,<h2> &<p> elements. Practice with examples
- How to Add Colors to Bootstrap Icons with CSSCSS
Using icons is great for every website. If you face the difficulty of adding color to Bootstrap icons, add the CSS color property. Change also the font-size.
- How to Add Image in the Title BarHTML
Make your website look more attractive by using favicons in the title bar. See how favicons are created and find more information about them.
- How to Add Multiple <tbody> Elements in the Same TableHTML
A <table> can have multiple <tbody> elements each of them specifying a row group. Read this snippet to see how to add several <tbody> elements in the same table.
- How to Add Non-Standard Fonts to a WebsiteCSS
In this tutorial, you can find some methods to make the design of your website attractive using unique fonts. See how you can use the @font-face rule property.
- How to Add Opacity Cross BrowserCSS
The opacity property sets the level of transparency of an element. Learn how How to Set the Opacity with w3docs tutorial. Also, try the examples yourself.
- How to Add Style to the Parent Element when Hovering a Child ElementCSS
It is possible to style the parent element when hovering a child element. In this snippet, we’re going to demonstrate and explain how to do this step by step.
- How to Add Telephone Links with HTMLHTML
In this snippet, you will find out how it is possible to add telephone links with HTML. See examples and try to add and style telephone links by yourself.
- How to Adjust the Position of List Style ImageCSS
In our snippet, we’ll show how to properly use the padding to overcome the difficulty of applying the padding not only to the list items but also to images.
- How to Align a Checkbox and Its Label Consistently Cross-BrowsersCSS
Checkbox is one of HTML forms that is used on every website. This tutorial will show how to align checkboxes and their labels consistently across browsers.
- How to Align Divs Side by SideCSS
We’ll show you how to set divs side by side by using CSS flexbox, float and display properties. Also see examples.
- How to Align Labels Next to InputsHTML
In this snippet, you’ll learn how to align <label> elements next to <input> elements. Align labels to the right and left of inputs by using CSS properties.
- How to Align the <span> Element to the Right of the <div>HTML
Find out how to align a <span> element to the right of the <div> element in this tutorial. We’ll explain how you can do this with the CSS float property.
- How to Allow Only Positive Numbers in the Input Number TypeHTML
In this snippet, we’ll demonstrate how to allow only positive numbers in the input number type. You can use the “min” attribute to specify restrictions.
- How to Allow the File Input Type to Accept Only Image FilesHTML
In this tutorial, we’ll show how to allow the file input type to accept only image files or certain image file extensions. Use the HTML “accept” attribute.
- How to Animate the Background of the Progress BarCSS
On this page, we’ll demonstrate how to animate the background of a progress bar created with the HTML <progress> element. Read this snippet to find the answer.
- How to Apply CSS Style to the Element NameCSS
In this snippet, we’re going to demonstrate how you can apply CSS styles to the name of the element. For that, you can use attribute selectors. See examples.
- How to Apply Global Font to the Entire HTML DocumentCSS
In this snippet, we’re going to apply a global font format to the whole HTML page. Read our snippet and find out how this can be done with and without !important.
- How to Assign a Checked Initial Value to the Radio ButtonHTML
In this tutorial, find out how you can assign a checked initial value to the radio button with HTML. To achieve that goal, you need to use the checked attribute.
- How to Auto-Hide a Placeholder Text on Focus with CSS and jQueryCSS
The placeholder attribute describes the expected value of an input field. See how to auto-hide placeholder text on focus using HTML, CSS, and jQuery.
- How to Auto-Resize the Image to fit an HTML ContainerCSS
Find some ways of stretching the image to fit the div container. Learn how to auto-resize an image or a video with the help of CSS illustrated in the examples.
- How to Break Line Without Using <br> Tag in CSSCSS
There are a few ways to break a line without using a <br> tag. For that, we can use the white-space and display properties, as well as pseudo-elements.
- How to Center a Background Image Inside a DivCSS
In this tutorial, find out how you can center your background image within a <div> element. For that, use the CSS background and background-size properties.
- How to Center an Image Between the ContainersCSS
Don’t know how to center the image between two containers? This snippet is just for you. Read it and follow the steps to solve this problem.
- How to Center an Image with the CSS text-align PropertyHTML
In this snippet, you can see a trick, which can help to center an <img> element with the CSS text-align property. Use a <div> and apply the style to it.
- How to Center the Text in the HTML Table RowCSS
In this snippet, we’ll demonstrate and explain examples of centering a text in the table row. For that purpose, you can use the CSS text-align property.
- How to Change Cursor on Hover in CSSCSS
Learn about the ways of changing the default cursor. See funny tricks to do with cursors and set images and icons as a cursor on your website.
- How to Change the Color of an <hr> ElementHTML
The HTML <hr> element is a block-level element and creates a horizontal line. In this snippet, find out how to style a horizontal line by adding a color to it.
- How to Change the Color of PNG Image With CSSCSS
Learn how you can change the color of PNG image with the filter CSS property values. See some examples and create your own code!
- How to Change the Color of the First Word in a TextCSS
In this tutorial, you can see how to change the color of the first word of a text. For that, use the CSS :before pseudo-element with the content property.
- How to Change the Input and Button Images with CSSCSS
It may be difficult to style buttons, especially when we need to change them to images. You can change buttons to images with <input> and <button> elements.
- How to Change the Size of GlyphiconsHTML
In this snippet, you’ll find out how to change the size of glyphicons. You need the CSS font-size property to increase all glyphicons or only one of them.
- How to Check If an Element Contains a Class in JavaScriptJavaScript
Read this tutorial and learn valuable information about the multiple methods that are used for checking if the element contains a class in JavaScript.
- How to Clear the Canvas for RedrawingJavaScript
The <canvas> element helps drawing graphics on the fly via JavaScript. Read the tutorial and find the dos and don’ts of clearing the canvas for redrawing.
- How to Click Through a div to its Underlying ElementsCSS
You don't know how to click through a div to its underlying elements, and this causes some problems for you? Read this snippet and solve this problem.
- How to Control the Space Between Bullets and <li> ElementsHTML
In this snippet, you can find out how to control the space between bullets and <li> elements. You can use the HTML <span> element and the CSS left property.
- How to Control the Width of the <label> TagCSS
Since the <label> tag is an inline element, using the width property won’t have any effect. Here you can find some methods of adding width to the <label> tag.
- How to Create a Blinking Effect with CSS3 AnimationsCSS
In this tutorial, we’ll demonstrate how to create a blinking effect for a text or background easily. To achieve this goal, you need to use CSS3 animations.
- How to Create a Blurry Text in CSSCSS
One of the best effects to stylize your text, is making it appear blurred. In this snippet, we are going to show you two methods of creating a blurry text. So here we go.
- How to create a drop-down navigation menu with CSSCSS
Learn how to create a drop-down navigation menu with <ul> tag. Create your code step by step and try examples!
- How to Create a Fullscreen Image Slider with Pure CSSCSS
Creating a fullscreen slider is an easy thing to do with the help of HTML and CSS properties. Read the tutorial and create your own cool fullscreen slider easily.
- How to Create a Glowing Border Around an Input FieldCSS
In this snippet, we’re going to demonstrate some examples of creating a glowing border around an input field. For that, you need to use some CSS properties.
- How To Create a Glowing TextCSS
Catch your user’s attention with beautiful glowing text created with only CSS. See examples and get the code snippet to create your own glowing text.
- How to Create a Hidden Div without a Line Break or Horizontal SpaceHTML
In this snippet, we’re going to demonstrate how you can create a hidden <div> element without a line break or horizontal space. Use the CSS display property.
- How to Create a List With Dashes in HTMLHTML
In this tutorial, find out how it is possible to style a list with dashes instead of bullet points. Use the :before pseudo-element with the content property.
- How to Create a Modal Dialog Box with CSS and JavaScriptJavaScript
Learn how to create Modal Dialog with adding a bit of Javascript to your code. Create your code step by step and find examples!
- How to Create a Multi-Line Text Input Field In HTMLHTML
In this snippet, we’ll demonstrate how to create a multi-line text input field in HTML. Read this tutorial and see how this can be done with the <textarea> tag.
- How to Create a Multicolor Text with HTML and CSSCSS
If you want to make your Web page more attractive using multicolor texts, read our snippet, find out 3 ways of creating ones and see examples.
- How to Create a New DOM Element from HTML StringJavaScript
Read this JavaScript tutorial and find the method that is used for creating a new DOM element from an HTML string. Get the explanation and see examples.
- How to Create a Placeholder for an HTML5 <select> Box by Using Only HTML and CSS?CSS
Learn how to make a placeholder for a select box. Use only 3 HTML attributes or CSS :invalid pseudo-class and the display property set to none.
- How to Create a Responsive Iframe with CSSCSS
If you want to make your iframe responsive, read our tutorial and find out CSS tricks and frameworks you need to use for creating a responsive iframe.
- How to Create a Responsive Login Form in Navbar with CSSCSS
Apparently, all websites have login forms and millions of people log in every day. Create a login form in navbar for your website in an easy way using just HTML and CSS.
- How to Create a Teardrop in HTMLHTML
The best way of creating a teardrop is to use SVG, which is used to specify vector-based graphics. In our snippet, we show how to create a teardrop using SVG.
- How to Create a Two-Column Div Layout with the Right Column Having Fixed WidthHTML
In this tutorial, we’ll explain how to create a two-column <div> layout with the right column having a fixed width. Here, you can find some examples.
- How to Create a Typewriter Text with Pure CSSCSS
You must agree that a text that looks like it is being typed across the screen looks quite attractive. Did you know that you can apply a typewriter effect to your own text by using pure CSS? Now we are going to do that together, step by step!
- How to Create an Anaglyphic Text Effect with CSSCSS
If you want to add some 3D effects to your text, anaglyphic text effect is a great solution. Read this snippet, try our examples and create one for yourself.
- How to Create an Animated Filled Text with CSSCSS
If you are looking for ways for making your website more imaginative, read this snippet and learn to create an animated filled text due to our examples.
- How to Create an HTML Table with a Fixed Left Column and Scrollable BodyHTML
It is possible to create a table, which has a fixed left column and a scrollable body. In this snippet, you’ll see how this is done using some CSS properties.
- How to Create an Unordered List without BulletsHTML
In this snippet, we’re going to demonstrate how to create an unordered list without bullets using the CSS list-style-type property for the parent element.
- How to Create Animated Menu Box With IconsCSS
Animations are definitely the key to success on the website! Read this super easy tutorial and create your beautifully animated navbar with nice icons step by step.
- How to Create Animation on Page LoadCSS
In this snippet, you will find information and examples on creating an animation on page load. For that, use CSS @keyframes and some animation properties.
- How to Create Button with Line BreaksHTML
Learn different ways of how to create buttons with line breaks. See also how to give styling to them with examples.
- How to Create Checkbox with a Clickable LabelHTML
It is possible to create a checkbox with a clickable label. In this snippet, you can see how to create a checkbox with a clickable label with two methods.
- How to Create Circles with CSSCSS
There are many techniques used to create a circle in CSS. In our snippet, you can find some techniques that are widely used and have good browser support.
- How to Create Contact Form With CSSCSS
Create a contact form for collecting user’s contact details and opinions about your website. Follow the steps and create a contact form with CSS in a simple way.
- How to Create CSS Gallery Without Using JavaScriptCSS
It turns out it is totally possible to create a simple CSS gallery without using Javascript. In this article we are going to show you how to do that with only HTML or CSS.
- How to Create Custom Checkboxes and Radio ButtonsCSS
Learn how to create and style custom checkboxes and radio buttons. Also set custom images as checkboxes and radio buttons. See all with examples.
- How to Create Flashing/Glowing Button Using Animations in CSS3CSS
Know how to create a flashing/glowing button with the help of CSS. Also, see examples!
- How to Create Fullscreen Overlay Navigation MenuJavaScript
Read this tutorial and learn which two functions are used to create a fullscreen overlay navigation menu to make your website more beautiful and catchy.
- How to Create Glitch Effect With CSSCSS
All of us can remember glitch effects from our TV sets! Learn how to create one of the coolest effects for your website and also catch the examples with pure CSS.
- How to Create Mailto FormsHTML
Learn about how to create a Mailto forms with examples. See also the advantages that Mailto forms can have.
- How to Create Mailto LinksHTML
Learn about how to create a Mailto link in HTML step by step with examples. See also the downsides that Mailto links can have.
- How to Create Pagination with CSSCSS
Pagination has a greate role in the SEO of your website. Read the article and know how to create standard and beautifully designed pagination with just HTML and CSS.
- How to Create Polaroid Image With CSSCSS
Do you want to get '90s vibes with just only CSS? This tutorial is just for you to create a Polaroid image effect for the website. Follow the steps and get examples.
- How to Create Range Slider With HTML5 and jQueryJavaScript
HTML5 range input type allows creating range sliders. Read the tutorial and learn a simple solution including a jQuery code to achieve the desired result!
- How to Create Search BoxesCSS
Create and style beautiful search boxes without any JavaScript code. Learn the steps to create search boxes and find lots of examples in this tutorial.
- How to Create Stacked Paper EffectCSS
Create an awesome 3D stacked paper effect for your content container. Read the tutorial and find examples!
- How to Create Thumbnail ImagesCSS
If your Website contains lots of images and downloads slowly, read our snippet and learn to create thumbnail images, which will help you to solve this problem.
- How to Customize File InputsCSS
It is possible to customize the file input using a <label>. In this snippet, you’ll find the way of customizing the file input without using any JavaScript.
- How to Disable Form Fields with CSSHTML
In this tutorial, we’ll demonstrate how it is possible to disable form fields with some CSS. For that, you can use the pointer-events property set to “none”.
- How to disable input conditionally in Vue.jsVue.js
In this short Vue.js tutorial, you will read and learn about a very easy and fast method of disabling the HTML input conditionally in Vue.js components.
- How to Disable Text Selection Highlighting Using CSSCSS
Stop being copied by others with just simple and quick technique! Read the snippet and know how to prevent copying from your site disabling text selection highlighting.
- How to Disable the Browser Autocomplete and Autofill on HTML Form and Input FieldsHTML
Learn how to prevent browsers auto filling the input fields of HTML forms. Use autocomplete="off" to specify that autocomplete is disabled. See examples.
- How to Disable the Resizing of the <textarea> Element?CSS
Use the CSS3 resize property with its "none" value to disable the resizing function of the textarea element. Learn the ways of only vertically or horizontally resizing, too.
- How to Disable Word Wrapping in HTMLHTML
In this snippet, we’re going to demonstrate how you can disable word wrapping. For that, use the white-space property either with the “nowrap” or “pre” value.
- How to Disable Zoom on a Mobile Web Page With HTML and CSSCSS
One of the most common inconveniences both developers and users face is the zoom on mobile web pages. Well, we’re here to help you fix that problem.
- How to Display a Message if JavaScript is Turned OffJavaScript
If you have a content that will not function without JavaScript, you need to display a message with an explanation of the problem. In this snippet, we are going to have a look at 2 simple methods to display the content when JavaScript is turned off.
- How to Display an Ordered List with Nested CountersHTML
In this snippet, we’re going to show how you can display an ordered list with nested counters by using CSS. See some methods of overcoming this problem.
- How to Display Base64 Images in HTMLHTML
In this snippet, we’re going to demonstrate how you can display Base64 images in HTML. Use the HTML <img> element to embed Base64 encoded image into HTML.
- How to Display Ellipsis in the <span> Element Having Hidden OverflowHTML
In this tutorial, see how to display ellipsis in the <span> element having the CSS overflow property with the “hidden” value. Add the text-overflow property.
- How to display string that contains HTML in twig template?PHP
To display a string that contains HTML in a Twig template, you can use the raw filter.
- How to Display Symbols with HTMLHTML
In this snippet, you can see how to add and display different symbols, such as infinity ampersand and other symbols. For that, you need to use HTML Entities.
- How to Display Unordered List in Two ColumnsHTML
In this snippet, we’re going to demonstrate how you can display an unordered list in two columns using either the CSS columns or column-count property.
- How to Divide a Horizontal Line into Multiple PartsHTML
In this tutorial, you will learn how it is possible to divide an HTML horizontal line into multiple parts. For that, you can use the CSS border-top property.
- How to Embed PDF in HTMLHTML
Learn how to embed PDF documents in HTML using the a and iframes tags, and make PDF files not downloadable with W3Docs. Practice with examples
- How to Fix CSS Issues on SafariCSS
Browsers serve the web page content differently that is why while using some CSS properties, problems may occur on Safari. Read the snippet and find out a tricky way to solve this problem.
- How to Flip Text with CSSCSS
CSS3 allows us to have various effects, including text flipping due to transformation functions. See examples of upside down, horizontal and vertical flipping.
- How to Force the Content of the <div> Element to Stay on the Same LineHTML
In this snippet, we’ll demonstrate how to force the content of the HTML <div> element to stay on the same line. Use the overflow and white-space properties.
- How to Get a Specific Number of Child Elements With CSSCSS
The :nth-child() pseudo-class selects only the elements that are nth child elements. Read and see examples of getting a specific number of child elements.
- How to Get Multiple Selected Values of the Select Box in PHPPHP
Learn how to get multiple selected values of the selected box in PHP. In our snippet, we provide you with comprehensive information and handy examples.
- How to Get the Current Date and Time in JavaScriptJavaScript
The tutorial provides information of getting the current date, time and both by running a simple piece of code. Also, get the full explanation of the code.
- How to Get the Value of a Textarea using jQueryJavaScript
Read this tutorial and learn useful information about how you can detect the value of the HTML <textarea> element easily using one of the jQuery methods.
- How to Get the Value of Selected Option in a Select BoxJavaScript
Read the tutorial and learn the methods of getting the value of the selected option in a select box using jQuery. Read about the text() and val() methods.
- How to Get the Value of Text Input Field Using JavaScriptJavaScript
Read this tutorial and learn about several methods of getting the value of the input textbox value without wrapping the input element inside a form element.
- How to Handle Page Breaks when Printing a Large HTML TableHTML
In this snippet, we’re going to show how to deal with the problem connected with page break when you print a large HTML table. Use some CSS properties.
- How to Hide Scrollbars with CSSCSS
Do you know that a bright example of hiding the scroll bar is Facebook chat window? Learn how to hide scrollbars and find solutions! Snippet/CSS
- How to Hide the HTML5 Number Input’s Arrow ButtonsCSS
In this tutorial, you will read and learn several methods that are used to hide HTML5 arrow buttons from the number input with the help of CSS properties.
- How to Horizontally Center a <div> in Another <div>CSS
The <div> tag is used to define parts of a page or a document. Learn How to Horizontally Center a <div> in Another <div> with W3docs tutorial.
- How to Increase the Space Between the Dots of Dotted BordersHTML
In this snippet, we’ll show how you can overcome the difficulty of increasing the space between the dots of dotted borders. See what properties you can use.
- How to Insert an Element After Another Element in JavaScriptJavaScript
Read this JavaScript tutorial and learn useful information about modern approaches of inserting an element after another element using two easy methods.
- How to Insert Video in HTMLHTML
See how to use <video> and <iframe> tags instead of the <embed>, <frame> and <object> tags. Learn how to set video autoplay. Practice with examples.
- How to Limit Border Length with CSSCSS
You may come across the difficulty of making the border of an element shorter than its parent element. To overcome this, use CSS properties and HTML elements.
- How to Maintain the Aspect Ratio with CSSCSS
Very often developers want to create a div element, that can change its width/height as the window width changes. That can be done by maintaining the aspect ratio of the element.
- How To Make a <div> Element Extend to the Page Bottom Even Having No ContentCSS
In this snippet, we will show how to make a <div> element extend to the page bottom even when it has no content. Read the tutorial and find some examples.
- How to Make a <div> Fill the Height of the Remaining SpaceHTML
In this snippet, you can find some methods of making a <div> fill the remaining space. Use flexbox, absolute positioning, tables, or the calc() function.
- How to Make a Div Fill the Remaining WidthHTML
In this snippet, we’re going to demonstrate some ways of making a <div> expand to fill the remaining width. You can use the float and overflow properties.
- How to Make a Div Stick to the Top of Screen when Scrolling with CSS and JavascriptCSS
This snippet will help you to make a <div> stick to the top of the screen when you scroll the page. Find out how to this using HTML, CSS, and Javascript.
- How to Make a Div Vertically ScrollableCSS
Scrolls are a common part of websites. Learn How to Make a Div Vertically Scrollable with W3docs online tutorial. Try examples. Fast solution!
- How to Make a Semi-Transparent Background with CSSCSS
One design feature that can cause difficulty is a semi-transparent background. We’ll show how to make a transparent background with an opaque text on it.
- How to Make an HTML <div> Element not Larger Than its ContentCSS
How to Make a Div not Larger Than its Contents. Create <div> with the class "box". Place <h2> tag in the div and write some content in it. Fast solution!
- How to Make Button onclick in HTMLHTML
If you want to make a button onclick, you need to add the onclick event attribute to the <button> element. Learn How to Make Button Onclick with Examples.
- How to Make HTML <dt> and <dd> Elements Stay on the Same LineHTML
In this snippet, we’re going to demonstrate some ways of forcing the HTML <dt> and <dd> elements stay on the same line. You can use the CSS float property.
- How to Make Rounded Corners Hide the Overflow in Opera/ChromeCSS
In this tutorial, find out how to make rounded corners hide the overflow in Opera and Chrome. Read our snippet and find some examples to solve the problem.
- How to Make the Content of Input Start from the RightCSS
Sometimes, you may need to make the content (such as a text or number) of input start from the right. Read and find out what properties to use for that.
- How to Make the Cursor a Hand When Hovering Over a List ItemCSS
CSS suggests a variety of versions of a cursor. Learn how to create and make the cursor hand when the user hovers over a list item in different ways. See examples!
- How to Make the Div Height to Auto-Adjust to the Background SizeCSS
It is possible to make the <div> to automatically adjust to the background size without setting a specific height or min-height. In our snippet, we’ll show how this can be done.
- How to Make the Middle Item Stay CenteredHTML
Read this tutorial to find out how you can make the middle element stay centered regardless of the widths of the siblings. This can be done by using Flexbox.
- How to Make the Text Bold in HTMLHTML
In this snippet, you’ll see how to make the text bold by using the <strong> or <b> tags. Also, you can use the CSS font-weight property in the HTML part.
- How to Make the Text Input Non-EditableHTML
In this snippet, you can find two methods of making a text input non-editable. Use either the HTML “readonly” attribute or add the CSS pointer-events property.
- How to Match an Empty Input Box with CSSCSS
It is possible to match an empty input box only if the input field is required. In this snippet, we’ll show how to do this using the CSS :valid pseudo-class.
- How to minify php page html output?PHP
To minify HTML output in PHP, you can use the following steps:
- How to Open a Link From <iframe> in the Parent WindowHTML
In this snippet, you can find out how it is possible to open a link from the HTML <iframe> element in the parent window. For that, you can use the <base> element.
- How to output the response HTML data by a jQuery AJAX request?PHP
In a jQuery AJAX request, you can output the response HTML data using the .html() method.
- How to Overlay Images with CSSCSS
Overlays can be a great addition to the image and create an attractive website. In this snippet, you can find different examples of overlaying images with CSS.
- How to Overlay One Div Over AnotherHTML
In this snippet, we’ll demonstrate how you can create an overlay effect for two <div> elements. For that purpose, use the CSS position and z-index properties.
- How to Override !importantCSS
It is possible to override !important, although it isn’t recommended to use !important at all. But you can override the !important rule with another !important.
- How to Position One Image on Top of Another in HTML/CSSCSS
Sometimes, you may need to place one image over another one. It can be easily done with HTML and CSS. See how to use the position and z-index properties.
- How to Prevent Long Words from Breaking a DivCSS
In this snippet, we are going to present some methods that you can use to prevent long words from breaking a <div> element. For that, use HTML and CSS.
- How to Prevent Scrollbar from Repositioning Web PageCSS
When you center a page, it may move slightly on some browsers when navigating between pages. In this snippet, we’ll demonstrate how to solve this problem.
- How to Prevent Tab Indexing on Specific ElementsHTML
In this snippet, we demonstrate how it is possible to prevent tab indexing on specific elements. Read our tutorial to find out the answer and also try examples.
- How to Redirect a Web Page in HTMLHTML
The meta tag with the http-equiv parameter set to Refresh is used to redirect a web page in HTML. Take a look at how you should do it. Practice with examples.
- How to Redirect a Web Page with PHPPHP
In PHP, you can use several functions to make a redirect from one web page to another. Learn how to do it accurately with W3docs.
- How to Remove Background Image in CSSCSS
The background image is manipulated with the background-image property. But you may need to remove the background image, and we’ll show how it can be done.
- How to Remove Border from the <iframe> TagHTML
How to Remove Borders from the <iframe> Tag
- How to Remove Default Arrow Icon from a Dropdown ListHTML
In this snippet, we’re going to demonstrate how you can remove the default arrow icon from a dropdown list. For that, you can use the appearance property.
- How to Remove Focus Around Buttons on ClickHTML
In this snippet, you can see how to remove the focus around a button on click. To solve this problem, you use the CSS outline property with the “none” value.
- How to Remove the CSS :hover Behavior from an ElementCSS
On this page, learn how to remove the CSS hover behavior from a specific element. For that, you can use the CSS pointer-events property or :not() pseudo-class.
- How to Remove the Space Between Inline-block ElementsHTML
Do not know how to remove space between the inline-block elements? Read the tutorial and find the easiest techniques for the solution to your problem.
- How to Render an HTML String Preserving Spaces and Line BreaksHTML
In this tutorial, you can learn how to render an HTML text preserving spaces and line breaks. You need to use the HTML <pre> tag or the CSS white-space property.
- How to Replace col-xs-* in Bootstrap 4CSS
On this page, find out how you can make a column equal to extra small. To make it work in Bootstrap 4, you need to replace the col-xs-* class with col-*.
- How to Reset File Input with jQueryJavaScript
In this tutorial, you will read and learn useful information about the fastest method of resetting a file input by using some HTML and jQuery methods.
- How to Resize Images Proportionally for Responsive Web Design With CSSCSS
Learn how to resize images to have a responsive web design. Use HTML attributes or CSS width and height properties. See examples and practice the methods for yourself.
- How to Resize SVG in HTMLHTML
In this tutorial, we want to demonstrate how you can resize SVG image in HTML. For that, you can change the values of the “height” and “width” attributes.
- How to Retrieve an HTML Element's Actual Width and HeightJavaScript
Read this tutorial and learn about the two methods that are used to retrieve an HTML element’s actual width and height. Find the best method for your case.
- How to Right Align a Button with CSSHTML
In this tutorial, we'll demonstrate how to align a button to the right with CSS. For that purpose, you need to use the CSS float property with its “right” value.
- How to Rotate the <div> Element by 90 DegreesHTML
In this tutorial, you can see how to rotate the HTML <div> element by 90 degrees. For that purpose, use the CSS transform property with the “rotate” value.
- How to run a PHP function from an HTML form?PHP
To run a PHP function from an HTML form, you will need to create an HTML form with the desired inputs, such as text fields and submit buttons.
- How to Select All Child Elements Recursively in CSSCSS
Read our snippet and find out how to select all child element recursively in CSS. Use a child selector that matches all elements of a specified element.
- How to Select All Text in HTML Text Input When Clicked Using JavaScriptJavaScript
Read the tutorial and learn the two methods of selecting the entire text in HTML text input when clicked using JavaScript code snippets. Also, see examples.
- How to Select the Last Element of a Specific TypeHTML
In this snippet, we want to display how you can select the last element of a specific type. For that, you need to use the CSS :last-of-type pseudo-class.
- How to Select the Next Element in CSSCSS
In this snippet, you can find out how to select the second element that directly follows the first one. For that, you need to use the adjacent sibling combinator (+).
- How to Set a Box-Shadow on One Side of the ElementCSS
To set a box shadow on one side of an element, use the box-shadow property. Read and find examples of adding box shadows outside and inside an element.
- How to Set a Box-Shadow Only on the Left and Right SidesCSS
In this snippet, you can find some solutions to the problem of adding a box-shadow only on the left and right sides of the element. Use the box-shadow property.
- How to Set a Minlength Validation in HTML5HTML
In this snippet, find out what alternative attributes to minlength can be used to set a minlength validation in HTML5. Read our snippet and try examples.
- How to Set an Equivalent of the "cover" Value of the background-size Property for an <img> TagHTML
In this snippet, we’ll show how you can set an equivalent of the “cover” value of the background-size property for the <img> tag. Use the object-fit property.
- How to Set Background Color with HTML and CSSHTML
Learn how to set a background color in general, how to have gradient and changing background colors with examples.
- How to Set Border Opacity with CSSCSS
You can set the border opacity using a RGBA color as a value for the CSS border property. In this snippet, we’re going to demonstrate how it can be done.
- How to Set Cellpadding and Cellspacing in CSSCSS
Use CSS padding and border-spacing properties for setting cellpadding and cellspacing for tables. Step by step guide with examples.
- How to Set Default HTML Form Focus Without JavascriptHTML
In this tutorial, you’ll see how to set the default HTML form focus. This can be done without Javascript. For that, use the HTML “autofocus” attribute.
- How to Set the Checkbox Size with HTML and CSSCSS
Learn 2 methods of how to specify the size of a checkbox and have a larger size checkbox. Use width and height properties or the transform property. See examples.
- How to Set the Equivalent of "src" Attribute of an <img> Tag in CSSCSS
In this snippet, you can find the solution of setting the equivalent of “src” attribute of an <img> tag. For that, use the content or background-image properties.
- How to Set the Size of the <textarea> ElementHTML
In this tutorial, you will find two ways of setting the size of the HTML <textarea> element. For that purpose, you can use HTML attributes or CSS properties.
- How to Set the Table Column Width Regardless of the Text Amount in its CellsHTML
Sometimes, when the text in one of the cells of the column is too long, the column’s width change. Read this snippet to find out how to overcome this problem.
- How to Strip HTML from a String in JavaScriptJavaScript
In this tutorial, you will find several approaches to strippingan HTML from a sting in JavaScript easily. Get the codes and explanations right away.
- How to Style a Checkbox with CSSCSS
Checkbox is one of the HTML forms used on every website, but mostly they are not styled and look the same. If you want to make your site more attractive for users, you can simply style your checkboxes. If you don’t know how to do that, now we will create
- How to Style a Horizontal LineCSS
Learn the ways of styling and have attractive horizontal lines: how to change color and size, set images as horizontal lines and a pack full of various kinds of <hr> examples.
- How to Style Buttons with CSSCSS
Nice and attractive buttons can fill the overall look of your website. Learn how to create and style buttons with the help of CSS. Also, see lots of examples!
- How to Style Comment Box Using CSSCSS
Style comment boxes, change the background color, add a background image or set borders to your comment box. See all with examples.
- How to Style Even and Odd List ItemsHTML
In this snippet, we’re going to demonstrate how to style the even, odd, or both the even and odd items of an unordered list. See examples with each of them.
- How to Style Input and Submit ButtonsCSS
In this snippet, you will find out how to style input and submit buttons easily. Use various CSS properties to achieve this goal. Read the snippet and try examples.
- How to Style the HTML File Input Button with CSSCSS
Create and style file input with HTML and CSS in a tricky way. Follow the given steps and create code without including any JavaScript.
- How to Turn a Rectangular Image into a Cropped Square Image with CSSCSS
In this snippet, we’ll show how you can turn a rectangular image into a cropped square. We’ll use CSS and turn an image into a square without distorting it.
- How to Use and Style Icons with Pure CSS: An Ultimate GuideCSS
Style Font Awesome icon color, size, shadow, create buttons and lists, animate, rotate and position icons. All in one place with detailed examples.
- How to Use the "required" Attribute on the <select> Element in HTML5HTML
The “required” attribute works only on empty values. In this snippet, we’ll show how to apply it to the HTML <select> element. Read and find some examples.
- How to Use the "required" Attribute with the Radio Input FieldHTML
Read this snippet to find out how you can use the “required” attribute with the radio Input field. Here, you can also find an example and try it yourself.
- How to Use the HTML <fieldset> TagHTML
In this tutorial, you will find some examples of using the HTML <fieldset> element. Besides, you can find out why in general we need the <fieldset> element.
- How to Use the HTML accept AttributeHTML
In this tutorial, we’ll explain what is the HTML accept attribute and why it is used. Use this attribute to specify file types the user is allowed to choose from.
- How to Vertically Align a Text Next to the ImageCSS
A common question is how to align text next to an image vertically? Read this snippet and learn to do it step by step, as well as try different examples.
- How to Vertically Align a Text Within a <span> Tag to the CenterCSS
On this page, we’ll demonstrate how to vertically align a text within an HTML <span> element. Use the CSS align-items, text-align, or vertical-align properties.
- How to Vertically Align Elements in a DivCSS
On this page, you can find some methods allowing to vertically align elements in a <div>. Read and find the method depending on the specific situation.
- How to Vertically Align the Text with a Large Font Awesome IconCSS
In this snippet, we’ll show how you can align the text next to a large Font Awesome icon. For that, use the CSS vertical-align and the line-height properties.
- How to Vertically Align Two <div> Elements with BootstrapCSS
In this tutorial, learn how you can vertically align two <div> elements with Bootstrap. On this page, we’ll demonstrate some examples for Bootstrap 3.4.1 and 4.5.0.
- How to Wrap Text in a <pre> Tag with CSSCSS
The <pre> tag inserts a preformatted text into an HTML document. Since the <pre> tag doesn’t support wrapping, we’ll show how to do it with the help of CSS.
- HTML Layout TemplatesHTML
40 free HTML layout templates that are easy to modify or customize. Download and use them for your website.
- HTML/PHP - Form - Input as arrayPHP
To create an HTML form that submits an array as a form parameter, you can use the name attribute of the input element and give it a value in the form of an array.
- HTML5 Page StructureHTML
Learn how to create an HTML5 page step by step. From doctype to different sections. See syntax and examples and practice yourself.
- If else embedding inside htmlPHP
There are a few different ways you can embed PHP code inside HTML.
- Input Types for HTML FormsHTML
Learn about mostly usedLearn about mostly used input types which are used when creating HTML Forms. See Syntax and examples. input types which are used when creating HTML Forms. See Syntax and examples.
- Is It Possible to Nest an HTML <button> Element Inside an <a> Element in HTML5CSS
In this snippet, learn whether it’s possible to nest a <button> tag within an <a> in HTML5. To have a button linking to somewhere, you need an alternative solution.
- Is It Possible to Use a <span> Within Another <span>HTML
In this snippet, you will learn whether it is possible to use an HTML <span> element within another element. Read this tutorial and find the answer to this question.
- Is It Possible to Use the CSS @media Rule InlineCSS
In this snippet, you will find out why it is not possible to apply CSS @media rules inline. Read this snippet to learn how to apply them in the internal style.
- Java String new lineJava
In JavaScript, you can use the following special characters to add a new line in a string:
- Lazy load images with JavaScriptJavaScript
Read this tutorial and learn detailed information about some simple and fast techniques that are used to decrease image loading time using JavaScript.
- Make var_dump look prettyPHP
To make the output of var_dump() more readable, you can use the following approaches:
- PHP new line break in emailsPHP
In PHP, you can use the built-in function "nl2br" to convert newline characters to HTML line breaks in emails.
- php variable in html no other way than: <?php echo $var; ?>PHP
Yes, that is one way to output the value of a PHP variable in HTML.
- Remove HTML tags from a StringJava
To remove HTML tags from a string, you can use a regular expression to match and replace the tags with an empty string.
- Shadow Effects in CSSCSS
Use text-shadow and box-shadow CSS properties for shadow effects in CSS. See how to have amazing effects for texts, borders and boxes.
- Simple DatePicker-like CalendarPHP
A simple DatePicker-like calendar can be created using the PHP DateTime class and some basic HTML and CSS.
- submit a form in a new tabPHP
To open a form submission in a new tab, you can use the target attribute of the form element and set it to _blank.
- Submit html table data with via form (post)PHP
Here is an example of how to submit an HTML table data via a form (using the POST method) using PHP:
- Warning: DOMDocument::loadHTML(): htmlParseEntityRef: expecting ';' in Entity,PHP
This error message is indicating that there is an issue with an entity reference in the HTML code being parsed by the DOMDocument class.
- What does the CSS Tilde (~) Selector MeanCSS
In this snippet, we will introduce what is the subsequent-sibling combinator (~), why and how it is used. Try some examples to have a better understanding of it.
- What is aria-label and How to Use ItHTML
In this snippet, you can learn what is aria label, as well as when and how it can be used. Read our tutorial and find examples of using the aria-label attribute.
- What is the Difference Between <b> and <strong>, <i> and <em> TagsHTML
In this snippet, we’re going to explain the differences between the <b> and <strong>, <i> and <em> tags. Find out the differences and use them correctly.
- What is the Difference Between <section> and <div> ElementsHTML
Read this snippet to find out the differences between the HTML <section> and <div> elements and see which element to use in some specific situations.
- What is the Difference Between the "id" and "name" AttributesHTML
In this snippet, we’re going to discuss the differences between the “id” and “name” attributes, after which you’ll make a better decision of their usage.
- What is the Difference Between the hidden and aria-hidden AttributesHTML
On this page, you will learn what is the difference between the hidden and aria-hidden attributes. Read our snippet and see examples with these attributes.
- When to Use Double or Single Quotes in JavaScriptJavaScript
Almost all JavaScript developers come across the issue: when to use double or single quotes. Here, we explore possible cases, offering rational solutions.
- When to Use HTML <img> Tag and CSS background-image PropertyHTML
In this snippet, we’ll discuss the differences between the HTML <img> tag and CSS background-image property, which will help you make a better decision.
- Which are the Valid Values for the "id" AttributeHTML
The “id” attribute defines a unique identifier for HTML elements. In this snippet, you can find out, which are its valid values for HTML, CSS, and Javascript.
- Which is the Float Input Type in HTML5HTML
In this tutorial, you’ll learn which is the float input type in HTML5. Read our snippet and try some examples with the step value to see the solution to this problem.
- Which Tag is Better to Use: <embed> or <object>HTML
On this page, you will learn what is the difference between the HTML <embed> and <object> tags and which one is better to use. Read the snippet and find examples.
- Why and How the Bootstrap sr-only Class is UsedCSS
In this snippet, you can learn about the sr-only class and see how it is used in Bootstrap. To find more information, read our snippet and try examples.