HTML

  1. 创建一个简单的HTML文档结构:

    My HTML Page

    Hello, World!

    This is a simple HTML page.

  2. 创建一个表单:

CSS

  1. 添加样式到HTML文档:
    body {font-family: Arial, sans-serif;background-color: #f4f4f4;}h1 {color: #333;}p {font-size: 16px;line-height: 1.5;}

    JavaScript

  1. 简单的事件处理:

    document.getElementById('myButton').addEventListener('click', function() {alert('Button clicked!');});
  2. 操作DOM元素:

    This is a div.var myDiv = document.getElementById('myDiv');myDiv.innerHTML = 'Content changed!';myDiv.style.color = 'blue';