Delete HTML Elements
In this task all you have to do is delete your <h1>Hello World</h1> tags from the editor leaving
<h2>CatPhotoApp</h2>
<p>Kitty ipsum dolor</p>
untouched.
Click on run tests or press Ctrl + enter.
Now moving on to the next task .
Change the Color of Text
In this task we will be changing the color of our h2 element by changing the style we have to add style ="color: red" to your h2 tag like this
<h2 style="color: red">CatPhotoApp</h2>
<p>Kitty ipsum dolor</p>
Click on run tests or press Ctrl + enter.
Now moving on to the next task .
Use CSS Selectors to Style Elements
CSS stands for Cascading Style Sheets is a style sheet language used for describing the presentation of a document written in a markup language.
There are alot of css properties you can use to change the way your element looks like taking the style example from above
<h2 style="color: red">CatPhotoApp</h2>
by doing this only this tag is effected, if i write another h2 tag nothing will happen to it until i have styled it too that would make my code too long and a bit messy so we use css instead.
Now for that you need to open <style> element on the top of your code like this
<style>
</style>
with css you can select all h2 tags like this
<style>
h2 {
color: red;
}
</style>
Now the given task is to delete your h2 element style attribute and create a css style element like this also this time the color of text should be blue
<style>
h2 {
color: blue;
}
</style>
<h2>CatPhotoApp</h2>
<p>Kitty ipsum dolor</p>
Then click on run test(Ctrl+enter)
3 Tasks Completed!
That's it for now
Comment below to ask and questions related to this and I will be sure to answer it
Don't forget to like, tweet, share, subscribe!
No comments :
Post a Comment