HTML Basics Tut...LOGIN

HTML Basics Tutorial: Typesetting Tags

<p></p> represents a paragraph.

  • Common attributes: align: horizontal alignment, values: left (left), center (center), right (right)

  • Example: <p>php.cn</p>

  • ##
    <!DOCTYPE HTML>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        </head>
        <body>
           <p align="left">HTML是一种规范</p>
           <p align="center">是一种标准</p>
           <p align="right">编写网页的一种标准</p>
        </body>
    </html>

Line break mark<br>

Horizontal line mark (unilateral mark): <hr>

  • Size: The thickness of the horizontal line, the unit is general is px.

  • color: The color of the horizontal line.

  • width: The width of the horizontal line.

  • noshade: Remove the shadow of the horizontal line (in HTML, noshade is an attribute with no value). Such as: <hr noshade>

  • <!DOCTYPE HTML>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        </head>
        <body>
            HTML是一种规范,是一种标准,编写网页的一种标准。
            <hr size="2" color="red" width="80%" noshade>
            超文本:就是网页上不光有文本,还有图片、音乐、视频等。
            <br><br><br><br>
            标注:是一种记号,是一种标志。如:红绿灯
        </body>
    </html>

<pre>Pre-typesetting mark

Function: All whitespace characters (spaces, newlines) will be retained, in other words: they will be output unchanged. Next Section

<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head> <body> <p align="left">HTML是一种规范</p> <p align="center">是一种标准</p> <p align="right">编写网页的一种标准</p> </body> </html>
submitReset Code
ChapterCourseware