A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.w3resource.com/html-css-exercise/style-placeholder-text-answer.php below:

Website Navigation


HTML CSS Exercise: Style placeholder text

HTML CSS Exercise: Style placeholder textLast update on March 04 2024 06:51:35 (UTC/GMT +8 hours) Solution:

HTML Code :

<!DOCTYPE html<<!-- Document type declaration --<
<html<<!-- Opening HTML tag --<
<head<<!-- Head section containing metadata --<
<meta charset="utf-8"<<!-- Character encoding declaration --<
<title<HTML CSS Exercises - Style Placeholder text</title<<!-- Title of the HTML document --<
<style type="text/css"< /* Opening style tag for CSS with type attribute */
input[type="text"]::-webkit-input-placeholder { /* Styling placeholder text for text input fields in WebKit browsers */
color: orange; /* Set the color of the placeholder text */
}
</style<<!-- Closing style tag --<
</head<<!-- Closing head tag --<
<body<<!-- Body section of the HTML document --<
<!--insert this within html section. within body of codepen --<
<form action=""<<!-- Form element --<
<div<<!-- Div container --<
<label for="email"<Email:</label<<!-- Label for email input --<
<input id="email" name="email" type="text" placeholder="[email protected]"<<!-- Text input field with placeholder text --<
</div<<!-- Closing div container --<
</form<<!-- Closing form element --<
<!--insert this within css section. within body of codepen --<
</body<<!-- Closing body tag --<
</html<<!-- Closing HTML tag --<

Explanation:

Live Demo :

See the Pen style-placeholder-text-answer by w3resource (@w3resource) on CodePen.

Supported browser

What is the difficulty level of this exercise?

Test your Programming skills with w3resource's quiz.




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4