Create an HTML page that contains the following two lines of texts. The texts should match exactly what is given using HTML elements and stylesheet learned. You may pick the color that most closely match the ones given. The following is an example of the square cube of a number: If x = 4, x³ is 64
Hello I was hoping someone could help with this code. Thank you.
1. Start
2. Declare the HTML document structure with the <!DOCTYPE> declaration, <html>, <head>, and <body> tags.
3. Inside the <head> section:
a. Set the character set to UTF-8 using the <meta charset="UTF-8"> tag.
b. Add viewport meta tag for responsive design: <meta name="viewport" content="width=device-width, initial-scale=1.0">.
c. Set the title of the HTML page using the <title> tag.
d. Add internal CSS styles within the <style> tag for styling the text:
- Use .strikethrough class to add a line-through decoration for the "square" word.
- Use .underline-green class to add a green underline for the "cube" word.
- Use .pink-text class to set the color to salmon for the first line and remove margin and padding.
- Use .blue-text class to set the color to dodgerblue for the second line and remove margin and padding.
4. Inside the <body> section:
a. Create a paragraph (<p>) element with the class "pink-text" for the first line:
- Set the text content as "The following is an example of the "square" "cube" of a number:".
- Use <span> elements with appropriate classes for styling specific words within the sentence.
b. Create another paragraph (<p>) element with the class "blue-text" for the second line:
- Set the text content as "If x = 4, x<sup>3</sup> is 64".
5. End
Step by step
Solved in 4 steps with 2 images