-
创建一个包含标题、段落和链接的基本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 天前
幽冥大陆(七十二) 东方仙盟-在线IP归属地自己封装—东方仙盟练气期QT 小鲜肉1 天前
【Linux命令大全】001.文件管理之mc命令(实操篇)ttod_qzstudio1 天前
备忘录之事件监听器绑定陷阱:为什么 .bind(this) 会移除失败?土豆_potato1 天前
AI深度思考到底开不开ohyeah1 天前
React 中的跨层级通信:使用 Context 实现主题切换功能winfredzhang1 天前
打造专属桌面时钟:纯HTML实现的全功能动态时钟哥本哈士奇1 天前
使用Gradio构建AI前端 - RAG的QA模块扶我起来还能学_1 天前
Vue3 proxy 数据响应式的简单实现Dragon Wu1 天前
前端项目架构 项目格式化规范篇QQ 31316378901 天前
文华财经软件指标公式期货买卖信号提示软件