You can add style to an element by specifying it in the style
element and setting a property for it like this:
Example Code
element {
property: value;
}
Center the content of the h1
element by setting its text-align
property to the value center
.
my code so far…
<style h1 {text-align: center;}>
</style>
where am I going wrong with code…? Thanks!
I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>
) to add backticks around text.
See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').
Can you post the link to the challenge.
I appreciate the feed back, so basically every line add in back ticks to separate the code?
Hi there!
You added the styling for h1 element within opening style tag. You need to add it between the opening and closing style tags.
1 Like