HTML Introduction to HTML and CSS Adding a New Web Page Write the CSS

Jonathon Young
Jonathon Young
4,715 Points

My image remains square regardless of CSS instructions.

CODE

CSS: "body { font-family: "Arial";

}

.main-img{ border: solid 4px black; border-radius: 50%; }"

HTML "<img src="http://placeimg.com/640/480/any" alt"Jonathon, XXX, XXX" class="main-img">"

1 Answer

Jamie Reardon
Jamie Reardon
Front End Web Development Techdegree Student 12,522 Points

You have an error in your HTML syntax for the img tag. You are missing the = sign after the alt attribute and before its value.

  <img src="http://placeimg.com/640/480/any" alt="Jonathon, XXX, XXX" class="main-img">
body {
  font-family: "Arial";
}

.main-img { 
  border: solid 4px black;
  border-radius: 50%; 
}

When trying to share code with the markdown reference, don't use " use ``` followed by the language name. You can see examples if you click the link to the Markdown Cheatsheet reference below on this page.