-
创建一个包含标题、段落和链接的基本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
相关推荐
极客密码7 小时前
感谢雷总!Mimo大模型价值¥659/月的 MAX 套餐,让我免费领到了!深念Y8 小时前
我明白为什么B站没法在浏览器开直播了——Windows Chrome推流踩坑全记录zhangxingchao8 小时前
AI应用开发七:可以替代 RAG 的技术Sun@happy8 小时前
现代 Web 前端渗透——基础篇(1)希冀1239 小时前
【CSS学习第十一篇】隔窗听雨眠9 小时前
doctype、charset、meta如何控制整个渲染流水线kyriewen9 小时前
写组件文档写到吐?我用AI自动生成Storybook,同事以后直接抄excel9 小时前
🧠 Prisma 表名大写 vs SQL 导出小写问题深度解析(附踩坑与解决方案)周淳APP9 小时前
【前端工程化原理通识:从源头到运行时的理论阐述】五点六六六10 小时前
你敢信这是非Native页面写出来的渐变效果吗🌝(底层原理解析