How do I properly resize an image in HTML using VSCode?

0
1
Asked By CodingNewbie88 On

I'm a total newbie to coding—I literally just started learning HTML yesterday with about two hours of experience under my belt. I'm using 'live server' to preview my code, and resizing the image works just fine there. However, when I try to 'open in browser' using a popular extension, the image remains huge. Here's the code I'm using:

```html
Close up shot of man programming what looks to be C or some derivative, but it only shows his fingers and there's blur on most of it.
```

I'm still pretty lost and would appreciate any guidance!

3 Answers

Answered By HelpfulHannah25 On

Just a heads up, your alt attribute is a bit over the top! Also, the code is making your image 70% the size of its parent container, so you might want to adjust that if it’s still too big.

CodingNewbie88 -

I like to be descriptive, thanks for the help!

Answered By PixelPioneer56 On

Another simple fix is to just remove the percent signs from the height and width styles. You could use actual pixel values instead.

CodingNewbie88 -

ok thanks!

CodeMaster92 -

Think they also need to lose the semicolons in the style as they aren’t necessary.

Answered By TechieTom123 On

You should try reducing the height and width values a bit more. Something less than 70% could help with fitting it better.

CodingNewbie88 -

ight, thanks!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.