当前位置:网站首页>行内元素和块级元素有什么区别?语义化作用
行内元素和块级元素有什么区别?语义化作用
2022-07-28 20:15:00 【大鸡腿最好吃】
常见的行内元素
a,span,input,img
img,input为特殊的行内元素,可以设置宽高
常用的块级元素
div,h1-h6,p,ul,li,form
区别
行内元素不换行,宽高不可以设置,只能让他的子元素撑起来,内边距和外边距只在水平方向有效(对它周围的元素产生影响),内边距垂直方向显示效果增加,位置上不会有改变
块级元素自动换行,可以设置宽高,可以设置 margin、padding
display:inline块级转行内
display;block 行内转块级
display:inline-block行内元素或块级元素转行内块元素
语义化作用
- 对于编写代码的人来说,有语义化标签的HTML的结构,更加清晰,方便编写代码;
- 对于团队来说,方便团队的开发与维护;
- 对于浏览器,更加方便解析,
- 对于爬虫,有利于SEO;
边栏推荐
- 搞事摸鱼一天有一天
- Matlab|基础知识总结一
- Pytorch learning record (4): over fitting, convolution neural network CNN
- 90. 子集 II
- kingbase中指定用户默认查找schema,或曰用户无法使用public schema下函数问题
- Have you ever seen this kind of dynamic programming -- the stock problem of state machine dynamic programming (Part 2)
- openEuler Embedded SIG | 分布式软总线
- 基于BRNN的政务APP评论端到端方面级情感分析方法
- How many tips do you know about using mock technology to help improve test efficiency?
- 基于对象的实时空间音频渲染丨Dev for Dev 专栏
猜你喜欢

Oracle database objects

Knowledge description framework of foreign patent documents based on knowledge elements

Meeting notice of OA project (Query & whether to attend the meeting & feedback details)

使用Mock技术帮助提升测试效率的小tips,你知道几个?

软考 --- 数据库(3)数据操作

基于多模态融合的非遗图片分类研究

系统分析师

顺序表的实现

Open earphone which air conduction earphone with good sound quality and recognized sound quality is recommended

基于属性词补全的武器装备属性抽取研究
随机推荐
Lt7911d type-c/dp to Mipi scheme is mature and can provide technical support
基于对象的实时空间音频渲染丨Dev for Dev 专栏
Pyqt5 rapid development and actual combat 5.4 web page interaction
ESP8266-Arduino编程实例-深度休眠与唤醒
For the next generation chromebook, MediaTek launched new chipsets mt8192 and mt8195
基于多模态融合的非遗图片分类研究
Pytoch learning record (III): random gradient descent, neural network and full connection
这种动态规划你见过吗——状态机动态规划之股票问题(下)
Apifox:满足你对 Api 的所有幻想
LeetCode·581.最短无序连续子数组·双指针
LT7911D Type-C/DP转mipi 方案成熟可提供技术支持
系统分析师
Construction of Chinese traditional embroidery classification model based on xception TD
Hold high the two flags of 5g and AI: Ziguang zhanrui Market Summit is popular in Shencheng
Esp8266 Arduino programming example - timer and interrupt
Research on the recognition method of move function information of scientific paper abstract based on paragraph Bert CRF
Coolpad voluntarily terminated the patent infringement lawsuit against Xiaomi
Gateway technology of IOT technology stack
基于知识元的外文专利文献知识描述框架
How to search images efficiently and accurately? Look at the lightweight visual pre training model