EnterGamingYT Posted June 8, 2019 Share Posted June 8, 2019 How to put 2 "styles" in a text Ex: <h1 style: "background-color : blue"> and and here put an another "style" for example: Make your text blue and put in the middle Link to comment Share on other sites More sharing options...
dsonesuk Posted June 9, 2019 Share Posted June 9, 2019 To add inline styling to an block element such as h1 you would use <h1 style="color : blue; text-align: center;"> Header Text </h1> Otherwise you would use a identifier such as class or just h1 to target all h1 tags <h1 class="headerstyle"> Header Text </h1> With <style> .headerstyle { color : blue; text-align: center; } </style> Link to comment Share on other sites More sharing options...
ishan_shah Posted August 21, 2019 Share Posted August 21, 2019 Hello, You can give multiple styles using semicolons(;) to a single element. Following is the example of the same as an inline CSS. <h1 style="color:blue; text-align:center"> Your Text </h1> In case you want to apply internal CSS then your code will be as follows: <h1 id="header1">Your Text</h1> #header1 { color:blue; text-align:center } Link to comment Share on other sites More sharing options...
dsonesuk Posted August 21, 2019 Share Posted August 21, 2019 Polly want a cracker. Link to comment Share on other sites More sharing options...
shaili_shah Posted October 14, 2019 Share Posted October 14, 2019 <h1 style: "background-color : blue;text-align:center">heading text</h1> Link to comment Share on other sites More sharing options...
dsonesuk Posted October 14, 2019 Share Posted October 14, 2019 As long as these two have css coding to copy, plagiarize they will do well in css web development. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now