Learn html forms by building a registration form

body {
  width: 100%;
  height: 100vh;
  margin: 0;
  background-color: #1b1b32;
  color: #f5f6f7;
  font-family: Tahoma;
  font-size: 16px;

h1, p {
  margin: 1em auto;
  text-align: center;

form {
  width: 60vw;
  max-width: 500px;
  min-width: 300px;
  margin: 0 auto;

fieldset {
  border: none;
  padding: 2rem 0;
  border-bottom: 3px solid #3b3b4f;

fieldset:last-of-type {
  border-bottom: none;

label {
  display: block;
  margin: 0.5rem 0;

select {
  margin: 10px 0 0 0;
  width: 100%;
  min-height: 2em;

input, textarea {
  background-color: #0a0a23;
  border: 1px solid #0a0a23;
  color: #ffffff;

.inline {
  width: unset;
  margin: 0 0.5em 0 0;
  vertical-align: middle;

input[type="submit" display="block" width=60%]

Please Tell us what’s happening in your own words.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more you say, the more we can help!

I cannot understand the syntax of attribute selector that is mentioned in the step.

Can you post the link to the Step you are working on?

I figured it out. Thanks for your concern.


Selectors in CSS allow you to select particular HTML elements so you can style them. You’ve already gone through type, class and ID selectors in the previous challenges.

Attribute selectors do the same thing, they allow you to select elements that have a particular property.
If my HTML looks something like this:

<img alt="one" src="...."/>

<img alt="two" src="...."/>

<img alt="decoration" src="..." />

and I want to target the img element that has its alt property set to “decoration”, I can do something like this in my css

  width: 200px;

Hope this helps! :smile: :

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.