今天來認識一下兩個我不太常用到的html標簽:sub標記和sup標記。 定義和用法: sub 標簽可定義下標文本。 sup 可定義上標文本。都屬于行內元素,默認比當前字體稍小。例子: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns= http://www.w3.org/1999/xhtml head meta http-equiv= Content-Type content= text/html; charset=gb2312 / title html中的sub與sup標簽 /title style type= text/css * { font-size:12px; font-family:Tahoma} /style /head body div 這個標簽是 sub sub /sub 這個標簽是 sup sup /sup /div /body /html
舉一反三:
我們來看看數學方程式這種效果怎么實現?
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd html xmlns= http://www.w3.org/1999/xhtml head meta http-equiv= Content-Type content= text/html; charset=gb2312 / title html中的sub與sup標簽 /title style type= text/css * { font-size:12px; font-family:Tahoma} /style /head body div x sub 1 /sub +y sub 2 /sub sup 3 /sup =15 /div /body /html