


[HTML Basics] Top-level elements, block elements, inline elements, variable elements, element attributes_html/css_WEB-ITnose
Top-level elements:
说明:顶级元素表现如块,属于高级块元素。
例如:html,body,frameset
特点:独占一行,宽(100%)、高、行高、padding、margin可控div 常用于布局p 段落h1~h6 标题ol{li} 有序列表ul{li} 无序列表dl{dt,dd} 自定义列表table{tr,th,td,thead,tbody,tfoot,caption,col,colgroup} 表格form 表单pre 预文本格式address 地址blockquote 块引用fieldset{legend} 控件组hr 水平线menu{li} 菜单列表noscriptlegend 定义fieldset标题 HTML5新增:section 区块article 文章块aside 除主要内容外的内容块header 页眉footer 页脚nav 导航hgroup{h1~h6} 标题组合audio{source} 音频video{source} 视频canvas 图形datalist{option} 下拉列表单details 元素细节figcaption 定义figure标题figure{figcaption} 媒介内容分组summary 定义details标题已废弃元素:center,dir,isindex,noframes,frame,frameset
特点:不独占一行,宽、高、行高、竖向padding、竖向margin不可改变a 链接img 图片input 输入框span 内联区域strong 粗体强调textarea 多行文本框select{optgroup,option} 下拉菜单label 表单标注em 强调var 定义变量b 粗体i 斜体abbr 缩写bdo 文本显示方向br 换行cite 引用code 代码dfn 项目kbd 键盘文本q 短引用samp 样本代码small 旁注,小字体文本sub 下标sup 上标HTML5新增:bdi 文本方向,脱离周围文本方向command 命令按钮keygen 密钥mark 突出显示文本meter 预定义范围度量output 定义输出类型progress 进度条ruby 定义ruby注释rt 定义ruby注释解释rp 不支持ruby显示的内容time 日期/时间source 定义媒体元素的媒介资源 track 定义媒体元素的文本轨道已废弃元素:acronym,big,font,s,strike,tt,u,xmp
说明:可变元素根据上下文确定该元素是块元素还是内联元素。
button 按钮del 删除文本iframe 页面嵌入ins 插入文本map{area} 图像区块object object对象script 客户端脚本HTML5新增:embed 外部交互内容或插件已废弃元素:applet
<!-- --> 定义注释<!DOCTYPE> 文档类型html 定义html文档meta 元信息base 页面默认urlhead 文档信息link 资源引用style 定义样式已废弃元素:basefont
id 元素唯一名class 元素类名title 提示信息style 内联样式lang 语言编码tabindex tab键控制次序{number}dir 内容文本想法{ltr,rtl}accesskey 规定访问元素的键盘快捷键{character}HTML5新增:contenteditable 是否允许编辑内容{true,false}contextmenu 规定元素上下文菜单{id}data-value 自定义属性draggable 是否允许拖动{true,false}hidden 规定该元素无关{hidden}item 组合元素{empty,url}itemprop 组合项目{url,group,value}spellcheck 是否对元素进行拼写或语法检查{true,false}subject 规定元素对应的项目{id}

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

AnexampleofastartingtaginHTMLis,whichbeginsaparagraph.StartingtagsareessentialinHTMLastheyinitiateelements,definetheirtypes,andarecrucialforstructuringwebpagesandconstructingtheDOM.

GiteePages static website deployment failed: 404 error troubleshooting and resolution when using Gitee...

To achieve the effect of scattering and enlarging the surrounding images after clicking on the image, many web designs need to achieve an interactive effect: click on a certain image to make the surrounding...

The Y-axis position adaptive algorithm for web annotation function This article will explore how to implement annotation functions similar to Word documents, especially how to deal with the interval between annotations...

HTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.
