0
votes

i want to learn how to create an article with he header background for example

<article>
   <h1 background-color: green;> Title </h1> 
</article>

I want to know how to create an article post. btw im learing wordpress and i should need to have this done in code level.

3

3 Answers

2
votes

You need to place your style in a style attribute:

<article>
   <h1 style="background-color: green;"> Title </h1> 
</article>

Or

<article style="background-color: green;">
   <h1> Title </h1> 
</article>
1
votes

Have you tried: ...?

<article>
   <h1 style="background-color: green"> Title </h1> 
</article>
1
votes

it should be

<article>
   <h1 style='background-color: green;' > Title </h1> 
</article>

please go to this website https://www.w3schools.com/html/default.asp and learn THE HTML