我的html学习——第四天

<html>
<body>
<head>
<style>
.cities{
        background-color:black;
        color:white;
        margin:20px;
        padding:20px;
        }
span.red{
         color:red;
}
</style>
</head>
2016/11/21
<hr/>
<p style="font-family:arial;color:green">
无序列表<br/>
有序列表<br/>
定义列表
</p>
<h4>一个无序列表</h4>
<ul>
 <li>咖啡</li>
 <li>茶</li>
 <li>牛奶</li>
</ul>
<h4>一个square项目符号列表的无序列表,type=“square”(disc,circle,)</h4>
<ul type="square">
 <li>苹果</li>
 <li>香蕉</li>
 <li>柠檬</li>
 <li>桔子</li>
</ul>

<h4>一个有序列表</h4>
<ol>
 <li>咖啡</li>
 <li>茶</li>
 <li>牛奶</li>
</ol>
<h4>一个有序列表,从50开始计数</h4>
<ol start="50">
 <li>咖啡</li>
 <li>茶</li>
 <li>牛奶</li>
</ol>
<h4>一个小写罗马字母列表,type="i"(大写子母列表“A”,小写字母列表“a”,大写字母列表“Ⅰ”,小写罗马字列表“i”)<br/>
<b>注意</b><br/>代码是嵌套在“li”里的</h4>
<ol type="i">
 <li>苹果</li>
 <li>香蕉</li>
 <li>柠檬</li>
 <li>桔子</li>
</ol>
<h4>一个嵌套列表</h4>
<ol>
 <li>咖啡</li>
 <li>茶
   <ul>
    <li>绿茶</li>
    <li>红茶
      <ol type="a">
        <li>中国茶</li>
        <li>非洲茶</li>
      </ol>
            </li>
   </ul>
        </li>
 <li>牛奶</li>
</ol>
<hr/>
<p style="font-family:arial;color:green">
1.大多数 HTML 元素被定义为块级元素或内联元素。<br/>
2.块级元素在浏览器显示时,通常会以新行来开始(和结束)。(例子:h1, p, ul, table)<br/>
3.内联元素在显示时通常不会以新行开始。(例子:b, td,a, img)<br/>
4.HTML 的div 元素是块级元素,它是可用于组合其他 HTML 元素的容器。<br/>
5.HTML 的span 元素是内联元素,可用作文本的容器。<br/>
</p>
<hr/>
<p style="font-family:arial;color:green"> 对 HTML 进行分类(设置类),能够为元素的类定义 CSS 样式。为相同的类设置相同的样式,或者为不同的类设置不同的样式。<br/>
<b>注意</b><br/>此处cities前有“.”</p>
<h1>我的<span class="red">重要的</span>标题</h1>
<div class="cities">
<h2>london</h2>
<p>London is the capital city of England. It is the most populous city in the United Kingdom, with a metropolitan area of over 13 million inhabitants.</p>
<p>Standing on the River Thames, London has been a major settlement for two millennia, its history going back to its founding by the Romans, who named it Londinium.</p>
</div>
<div class="cities">
<h2>Paris</h2>
<p>Paris is the capital and most populous city of France.</p>
<p>Situated on the Seine River, it is at the heart of the 蝜e-de-France region, also known as the r間ion parisienne.</p>
<p>Within its metropolitan area is one of the largest population centers in Europe, with over 12 million inhabitants.</p>
</div>


</body>
</html>

猜你喜欢

转载自blog.csdn.net/happy_finding/article/details/53288499