Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!
  • Guest, before posting your code please take these rules into consideration:
    • It is required to use our BBCode feature to display your code. While within the editor click < / > or >_ and place your code within the BB Code prompt. This helps others with finding a solution by making it easier to read and easier to copy.
    • You can also use markdown to share your code. When using markdown your code will be automatically converted to BBCode. For help with markdown check out the markdown guide.
    • Don't share a wall of code. All we want is the problem area, the code related to your issue.


    To learn more about how to use our BBCode feature, please click here.

    Thank you, Code Forum.

HTML & CSS Styling in CSS vs a href image

danthemanayu

New Coder
i was curious if theres any difference between creating (for example) a solid color top banner or other visual elements directly in html/css vs uploading an actual png?
would one help the website load faster than the other?
for example, i'd much rather do all the graphic design in photoshop. but would that impact load speed by a considerable amount as opposed to just doing in in html/css directly?
why would one choose one over the other?(other than the design being too intricate to replicate it in html/css)
 
Hey :D

So there is two reasons, one is speed. Code is so much quicker then images and more adaptive. Imagine filling a 1000px x 500px box with blue. You now load your site on a phone and that box is now 50px x 50px you website will still load the massive image.

Second, to many images is bad for SEO, Google loves to see whats on your site and images they cannot read and for that they give you a penalty
 
thank you very much :)
yeah i kinda suspected that would be the case, however....regarding SEO, what if all the images have an "alt" text? would that trick google analytics completely? or would it just give a partial benefit?
i will do as much as i can in csss but i have to use some real life logos/title screens too.(its unavoidable).

heres a dumb question (but i gotta get them out of the way anyway). is there a way to convert an image to code pixel by pixel?or would that amount of code end up slowing things down even more than actually loading the image would? my images are small, like 15px (theyre custom emojis) however theres A LOT of them
 
Just a partial benefit, look at it this way. They can only read text they do not have a clue whats on your images. Your title may say cakes but your images and selling adult cakes lol. Little bits they don't mind but i tend to say try and keep it 60-70% text :D

Stupid questions are the best :D, You could but i wouldn't lol, Take code forums for an example, they have images they have emojis but there is more text and that's what you want to look at, images are fine just don't go crazy lol
 
Back
Top Bottom