DEV Community

Cover image for Some Code Tricks Every Web Developer Should Know
Shyam1806
Shyam1806

Posted on • Edited on

1

Some Code Tricks Every Web Developer Should Know

Contenteditable Attribute

This attribute allows you to make an element editable by the user like a text input.

<div contenteditable="true">
Hello User.
</div>

Placeholder Color

You can use the ::placeholder psuedo-element to style the placeholder text in an input field allowing you to customize the look
input::placeholder{
color:"#fff;
}

Top comments (0)

SurveyJS custom survey software

JavaScript Form Builder UI Component

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay