How to add color in input tags?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How to add color in input tags??

10th Aug 2023, 8:02 AM
Lubaina Alifa
Lubaina Alifa - avatar
15 Answers
+ 7
input { background-color: lightblue; border: darkblue solid 2px; color: green; }
10th Aug 2023, 8:38 AM
JaScript
JaScript - avatar
+ 5
Lubaina Alifa for some style of your website such as another color, position and more you need ever css. The question is only where you it write. You can implement that in html part of the page or in a extra file.
10th Aug 2023, 10:18 AM
JaScript
JaScript - avatar
+ 3
<input type="text" style="color: red; background-color: yellow;">
12th Aug 2023, 12:12 AM
Jai
+ 2
Thank you for your help. I will try this
10th Aug 2023, 8:06 AM
Lubaina Alifa
Lubaina Alifa - avatar
+ 2
Lubaina Alifa , Please show us your attempt here.. https://code.sololearn.com/WK4ntyrH6YK7/?ref=app Use the style attribute to style the element. Another way of color the input text: Use the <font> tag. One of its attribute are color, which allows you to color the given text.. But I often using style attribute instead of this. UPDATE: <font> tag does not work with <input> tag.
10th Aug 2023, 8:06 AM
Dragon RB
Dragon RB - avatar
10th Aug 2023, 10:00 AM
Lubaina Alifa
Lubaina Alifa - avatar
+ 2
How TO - Change Placeholder Color https://www.w3schools.com/howto/howto_css_placeholder.asp ::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */ color: red; opacity: 1; /* Firefox */ } :-ms-input-placeholder { /* Internet Explorer 10-11 */ color: red; } ::-ms-input-placeholder { /* Microsoft Edge */ color: red; }
10th Aug 2023, 11:59 AM
SoloProg
SoloProg - avatar
+ 1
I want to make this file without using css
10th Aug 2023, 9:23 AM
Lubaina Alifa
Lubaina Alifa - avatar
+ 1
Lubaina Alifa Note that If you're having trouble in code, share your code and then describe what error message you're receiving. without watching no one can figure out what's going wrong.
10th Aug 2023, 9:44 AM
Darpan kesharwani🇮🇳[Inactive📚]
Darpan kesharwani🇮🇳[Inactive📚] - avatar
+ 1
I want to color the Login button
10th Aug 2023, 10:01 AM
Lubaina Alifa
Lubaina Alifa - avatar
+ 1
Lubaina Alifa Instead of` <input type = "text" placeholder = Login` use this correct syntax `<input type="text" placeholder="Login">` See this modified code for login button.. https://code.sololearn.com/W1MbJ8f1InFk/?ref=app
10th Aug 2023, 10:25 AM
Darpan kesharwani🇮🇳[Inactive📚]
Darpan kesharwani🇮🇳[Inactive📚] - avatar
+ 1
Lubaina Alifa "I want to make this file without using css" That's easy. Just use JS: https://code.sololearn.com/WK4ntyrH6YK7/?ref=app But in this situation, CSS is the most convenient way to style your input.
10th Aug 2023, 12:41 PM
Dragon RB
Dragon RB - avatar
+ 1
You can directly use style attribute in the input tag like below. <input style="color:red" type="text"/ >
12th Aug 2023, 5:11 AM
gangareddy nachu
gangareddy nachu - avatar
0
I do not no hahah do you now minecraft
11th Aug 2023, 8:13 AM
Uzair Kayani
Uzair Kayani - avatar
0
<input style="color: red;" whatever>
11th Aug 2023, 7:00 PM
Love Malik