-
创建一个包含标题、段落和链接的基本HTML文档:
html<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>HTML Practice</title> </head> <body> <h1>Welcome to My Website</h1> <p>This is a sample paragraph. <a href="https://www.example.com">Visit our website</a>.</p> </body> </html>
-
创建一个无序列表和有序列表:
html<ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ul> <ol> <li>First</li> <li>Second</li> <li>Third</li> </ol>
-
创建一个表格展示学生信息:
html<table border="1"> <thead> <tr> <th>Name</th> <th>Age</th> <th>Grade</th> </tr> </thead> <tbody> <tr> <td>John Doe</td> <td>20</td> <td>A</td> </tr> <tr> <td>Jane Smith</td> <td>22</td> <td>B</td> </tr> </tbody> </table>
-
使用表单元素创建一个简单的登录表单:
html<form> <label for="username">Username:</label> <input type="text" id="username" name="username" required> <label for="password">Password:</label> <input type="password" id="password" name="password" required> <input type="submit" value="Login"> </form>
-
嵌套使用div元素创建一个基本页面布局:
html<div class="header"> <h2>My Website</h2> </div> <div class="nav"> <ul> <li>Home</li> <li>About</li> <li>Contact</li> </ul> </div> <div class="content"> <p>This is the main content of the page.</p> </div> <div class="footer"> <p>© 2023 My Website</p> </div>
HTML 实操试题(一)
知孤云出岫2023-12-28 14:33
相关推荐
祈澈菇凉1 小时前
Webpack的基本功能有哪些小纯洁w1 小时前
Webpack 的 require.context 和 Vite 的 import.meta.glob 的详细介绍和使用想睡好2 小时前
css文本属性qianmoQ2 小时前
第三章:组件开发实战 - 第五节 - Tailwind CSS 响应式导航栏实现记得早睡~2 小时前
leetcode150-逆波兰表达式求值zhoupenghui1682 小时前
golang时间相关函数总结White graces3 小时前
正则表达式效验邮箱格式, 手机号格式, 密码长度庸俗今天不摸鱼3 小时前
Canvas进阶-4、边界检测(流光,鼠标拖尾)bubusa~>_<3 小时前
解决npm install 出现error,比如:ERR_SSL_CIPHER_OPERATION_FAILED[廾匸]3 小时前
cesium视频投影