DEV Community

Cover image for HTML ⇒ The color Cape
Manu Martinez
Manu Martinez

Posted on

2 1

HTML ⇒ The color Cape

Hello tribe, how are you? Today we're going to talk about how to start giving colour to all this stuff we've been talking about since this madness started! give it sugar baby! 👻😈

Give colour?

Yes, I mean using css in html! so, from this post on, we are going to rotate the Wednesday topics between html and css.

Very nice but how do we do it? 🤔

There are three ways to incorporate css into html documents:

  • Inline styles(deprecated)
  • Styles in the head(deprecated)
  • Styles in a style sheet

Inline styles have this form and their use is not recommended:

<p style="color: red;"> red text</p>
Enter fullscreen mode Exit fullscreen mode

Styles that were placed in the head of the document did so in this way and their practice is also discouraged:

<style>
    p{
        color:red;
      }
</style>
Enter fullscreen mode Exit fullscreen mode

Styles with a link:

 <link rel="stylesheet" href="mydoc.css">
Enter fullscreen mode Exit fullscreen mode

This last one is recommended as it allows a huge improvement when loading the page as it means fewer lines in the html document as opposed to the first ones that I mentioned, so the performance of the page goes up like crazy.😜

Well guys raise your swords because CSS is coming! .⚔😎
Thanks for reading today's post and remember to be the best version of you

Image of Bright Data

Scale Your Data Needs Effortlessly – Expand your data handling capacities seamlessly.

Leverage our scalable solutions to meet your growing data demands without compromising performance.

Scale Effortlessly

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay