The correct HTML code to display(P+Q)2 is: a. <SUB>(P+) 2 </SUB> b. P+Q <SUP> 2 </SUP>
The correct HTML code to display(P+Q)2 is:
a. <SUB>(P+) 2 </SUB>
b. P+Q <SUP> 2 </SUP>
c. ( P + Q) <SUP>2 </SUP>
d. <SUP> (P+Q) 2 </SUP>
The correct HTML code to display(P+Q)2 is:
a. <SUB>(P+) 2 </SUB>
b. P+Q <SUP> 2 </SUP>
c. ( P + Q) <SUP>2 </SUP>
d. <SUP> (P+Q) 2 </SUP>
Best answer
Correct option is c. ( P + Q) <SUP>2 </SUP>
Answer: c. (P+Q)<SUP>2</SUP>
The <SUP> tag displays text as a superscript (raised above the line), which is how a power is shown. Only the exponent 2 should be inside the tag, while (P+Q) is written normally. The browser then shows (P+Q)2.
Option (a) uses <SUB>, which lowers text (subscript). Option (b) misses the brackets, giving P+Q2. Option (d) puts the whole expression inside <SUP>, so everything would be raised.
Practise this chapter
Log in or create a free account to answer this question.