html标签类型及转化

html>
<html>
    <head>
        <meta charset="utf-8">
        <title>html标签类型及其转化title>
        <style type="text/css">
            /*
            行标签和块标签和行内块标签可以相互转化类型。
            */
            span{
                background-color:orange;
                width: 100px;
                height: 100px;
                /*display:用于标签的转化*/
                /*block:快标签类型*/
                display: block;
            }
            div{
                background-color:yellow;
                width: 100px;
                height: 100px;
                /*inline:行标签类型*/
                display: inline;
                /*inline-block:行内块标签*/
            }
            img{
                width: 100px;
                height: 100px;
            }
        style>
    head>
    <body>
        

        
         <span>span标签span>
         <span>span2span>

         
          <div>div标签div>
          <div>div标签2div>
          <span>span3span>

          
           <img src="1.jpg">
           <span>span4span>
    body>
html>

你可能感兴趣的:(html标签类型及转化)