Computer Science, asked by abc9999, 1 year ago

write a code for creating an HTML document that prints the squares of numbers from 1 to 10 each number should be a separate line next to it the number to superscript and equal sign and the result​

Attachments:

Answers

Answered by dylandiva
12

1<sup>2</sup>=1

2<sup>2</sup>=4

3<sup>2</sup>=9

4<sup>2</sup>=16

5<sup>2</sup>=25

6<sup>2</sup>=36

7<sup>2</sup>=49

8<sup>2</sup>=64

9<sup>2</sup>=81

10<sup>2</sup>=100

Answered by anurimasingh22
2

Answer:

<!DOCTYPE html>

<html>

   <head>

       <title> Squares of numbers </title>

   </head>

   <body>

       <h2> Squares of numbers from 1 to 10 </h2>

       <br>

       1<sup>2</sup> = 1

       <br>

       2<sup>2</sup> = 4

       <br>

       3<sup>2</sup> = 9

       <br>

       4<sup>2</sup> = 16

       <br>

       5<sup>2</sup> = 25

       <br>

       6<sup>2</sup> = 36

       <br>

       7<sup>2</sup> = 49

       <br>

       8<sup>2</sup> = 64

       <br>

       9<sup>2</sup> = 81

       <br>

       10<sup>2</sup> = 100

   </body>

</html>

Explanation:

<sup> tag in HTML:

  • The <sup> tag in HTML defines the superscript text.
  • The <sup> tag is a container tag that has both opening and closing tags.
  • They are used mostly in equations like x^{2} =4
  • This can be written in HTML as x<sup>2</sup> = 4

<br> tag in HTML:

  • The <br> tag in HTML is used to insert a line break.
  • This is used when we need the text to be displayed in a separate line.
  • The <br> tag is an empty tag, that is, it has no closing tag.

Similar problems with HTML:

https://brainly.in/question/11203198

https://brainly.in/question/19809985

Similar questions