当前位置:首页 > Web开发 > 正文

100); /script html5的属性: 标准属性和事件属性

2024-03-31 Web开发

html的标签以及常用的属性

1.段落标签 :<p> <br>

2.文字标签:font-size

<h1><font face = "verdana">666666</font></h1>

<p><font size = "5" face = "arial" color = "red">89789789</font></p>

3.图片标签 :img

<img src="/i/eg_tulip.jpg" alt="郁金香">

4.超链接标签:a

<a href="https://jeesite.gitee.io/">jeesite</a>

5.列表标签:ul  li

<ul>

        <li>1</li>

        <li>2</li>

        <li>3</li>

    </ul>

6.表格标签:table

<table>

        <tr>

            <th>1</th>

            <th>2</th>

        </tr>

        <tr>

            <th>3</th>

            <td>4</td>

        </tr>

    </table>

7.表单标签:form

 <form action="/demo/demo_form.asp">

        登录:<br>

        <input type="text" name="firstname">

        <br>

        暗码:<br>

        <input type="text" name="lastname">

        <br>

        <button>登录</button>

</form>

html5新增标签和属性

canvas:通过标签界说图形,一般它会通过js去画一个图形。

 <canvas id="myCanvas">画一个图像</canvas>

    <script type="text/javascript">

        var canvas = document.getElementById(‘myCanvas‘);

        var ctx = canvas.getContext(‘2d‘);

        ctx.fillStyle=‘#FF0000‘;

        ctx.fillRect(0,0,80,100);

    </script>

html5的属性:

标准属性和事件属性,自行w3c。

媒体的标签:

链接地点:https://www.cnblogs.com/niujifei/p/11074026.html

 

 

 

温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/web/32267.html