Lolonado / prj-rev-bwfs-dasmoto

0 stars 0 forks source link

Inline styles #2

Open jim-rosales opened 6 years ago

jim-rosales commented 6 years ago

Usually, it is not best practice to use inline styles in an HTML file. You can read more about when and when not to use inline styles here.

The reason for this is because using inline styles makes it harder to maintain a project. For example here if you decided down the road to update the color of the text to red for instance you would need to update it in three separate places. Apart from this in larger projects, it might be harder to track down all the locations where the inline styles are being used.

The alternative to using inline styles would have been to try something like the following: Here you target all the spans and apply the desired styles in your stylesheet.

span {
    font-weight: bold;
    font-family: Helvetica;
    color: blue;
}

https://github.com/Lolonado/prj-rev-bwfs-dasmoto/blob/7010b88d9f48461946ba985f07a6025e46ab6401/Dasmotos%20arts%20and%20crafts/index.html#L23

Lolonado commented 6 years ago

Thanks I was thinking about this but thought it wouldn't work.Thank you for making it clear