-1

In HTML4, it used to be just

<html>
<body>
<font color="tomato">ABC</font>&nbsp<font color ="blue">Airlines</font>
</body>
</html>

But apparently, it's non-functional in html5. In the w3schools tutorial, it says that we should use -

<!doctype html>
<html>
<body>
<p style="color:red">This is a paragraph.</p>
</body>
</html>

but I can't change the font individually of 2 words in the same line. What do I do? I don't want to use div for this.

Yash Sharma
  • 11
  • 1
  • 3
  • Since it looks like a logo and known text-length, background-clip can be used : example https://codepen.io/gc-nomade/pen/bGBrXpW (Also added a stroke and a shadow from a single tag) – G-Cyrillus Feb 21 '21 at 10:49

2 Answers2

0

You can use span tag for individual styling You can style whatever you want like font, color so on...

Like this :

<!doctype html>
<html>
<body>
<p >
  <span style="color:red"> This is </span>
  <span style="color:green"> Paragraph </span>
</p>
</body>
</html>

0

You could use the <span> tags.

<html>
<p>
  <span style="color: red">ABC</span>
  &nbsp
  <span style="color: blue">Airlines</span>
</p>
</html>
Rathin
  • 1
  • 3