zoukankan      html  css  js  c++  java
  • html基础

    遇到的问题:html文件运行时没有调用css中设置的样式

    1.HTML文件

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=>, initial-scale=1.0">
        <title>William's html</title>
        <style>
            /*I am adding some css here to make things look better~~*/
            /* h1{color: aqua;}
            p{
                color: red;
            } */
    
    /* <!--通过id或者class来定义样式--> */
            /* #who{
                color: seagreen;
                widows: 500px;
                height: 500px;
                font-size: 200%;
    
            }
            .intro{
                color: steelblue;
    
            } */
        </style>
        <link rel="stylesheet" href="style.css">
    
    
    </head>
    <body>
        <!--This is a comment in HTML~~~-->
        <div>
            <h1 id="heading"><em>This is a heading,yeal!!!</em></h1>
            <p class="intro">This is a paragram.</p>
    
            <h2 id="who"><em>Who am I?Who am IWho am IWho am IWho am IWho am IWho am IWho am IWho am I
                Who am IWho am IWho am IWho am IWho am IWho am IWho am IWho am IWho am IWho am I
            </em></h2>
            <p class="name">I'm William</p>
            <p class="place"> I am come from earth</p>
    
            <span><strong>This is a span,yeah!!!!!!!!!!!</strong></span>
            <span>This is a another span,</span>
            <img src="white hat.jpg" alt="There should to be a img">
            <a href="https://www.bing.com">Click me to search~~~</a>
        </div>
    
        <form action="" method="">
            <input type="text">This is a text input~
            <input type="date">This is a date input~
            <input type="radio">This is a radio input~
            <input type="checkbox">This is a checkbox~
        </form>
    
        <form action="" method="">
            <label for "name">Please Enter Your Name<input type="text" id="name"><br>
            <label for "age">Plese Enter Your Birthday<input type="date" id="age"><br>
            <label for "service1">Service1 <input type="radio" id="service1"><br>
                <label for "service2">Service2 <input type="radio" id="service2"><br>
                    <label for "service3">Service3 <input type="radio" id="service3"><br>
            <input type="checkbox">This is a checkbox~<br>
            <button>I am just a normal button</button>
            <button type="submit">I am a very powerfull button</button>
            <button type="reset">I am a evil reset button</button>
            <button type="button">I am a picture with pic of white hat.jpg<br>
                <img src="white hat.jpg" alt="Still a white hat img">
            </button>
    
        </form>
    </body>
    </html>

    2.css文件

        /*I am adding some css here to make things look better~~*/
        /* h1{color: aqua;}
        p{
            color: red;
        } */
    
    /* <!--通过id或者class来定义样式--> */
        #who{
            color: seagreen;
            widows: 500px;
            height: 500px;
            font-size: 200em;
    
        }
        .intro{
            color: steelblue;
    
        }

    3.学习资源

    https://www.w3school.com.cn

    https://developer.mozilla.org/zh-CN/

  • 相关阅读:
    StringBuffer
    Mysql语法大全
    String类
    装箱拆箱
    修饰符
    杨辉三角
    基本变量类型
    随手快递app开发第五天
    随手快递app开发第四天
    随手快递app开发第三天
  • 原文地址:https://www.cnblogs.com/jpr-ok/p/12625348.html
Copyright © 2011-2022 走看看