Blogger Information
Blog 6
fans 1
comment 1
visits 4981
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
第0402课:html5文档结构与属性
安静的旅途
Original
625 people have browsed it

第0402课:html5文档结构与属性

CSS样式1:重置元素样式

  1. <style>
  2. body,h1{ /* 初始化body 和h1标签 */
  3. margin: 0;
  4. padding: 0;
  5. }
  6. </style>

CSS样式2:定义一个css引用类

  1. <style>
  2. .bg{ /* 元素引用类 */
  3. color: #ffffff;
  4. background-color: #ff0000;
  5. }
  6. </style>

CSS样式3:块状化非块元素

  1. <style>
  2. h1,a,form{
  3. display: block;/*块状化h1 a form方便排版,正常不需设置 */
  4. margin: 0 20px 20px;
  5. }
  6. </style>

HTML结构1:html h1元素的基本用法

  1. <h1 class="bg">PHP中文网欢迎第十一期的学员......</h1>

HTML结构2:html a标签的用法

  1. <!--
  2. a标签 target="_blank"属性 设置新打开打一个目标文档;
  3. a标签 title属性,为提示文本
  4. -->
  5. <a href="https://www.php.cn/" target="_blank" title="php中文网">php中文网-程序员的加油站!</a>

HTML结构3:html 表单元素及内部元素的基本用法

  1. <form action="0403/index.php" method="POST">
  2. <!-- label标签中for属性用于与指定表单中的元素绑定 -->
  3. <label for="input_email">Email:</label>
  4. <!--
  5. placeholder为输入字段的提示信息;
  6. required为input的提交前必填属性,required属性值默认为required即必须填写,非必填不写required属性即可;
  7. -->
  8. <input type="text" placeholder="Email" id="input_email" name="input_name" required/>
  9. <button>提交</button>
  10. </form>

Correcting teacher:天蓬老师天蓬老师

Correction status:qualified

Teacher's comments:手写拍照上传, 不是拍屏幕, 下次注意, 这次放过
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post