網頁設計之路(1)

來源:互聯網
上載者:User

標籤:style   http   color   io   使用   ar   div   c   on   

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>my web</title>
<style type="text/css" >
h1{ color:#00C}
p { color:#009}<!--內部樣式表-->
</style>
<link rel="stylesheet" type="text/css" href="/html/csstest1.css" ><!--外部樣式表-->

</head>
<body bgcolor="#99FF99">
<h1 align="center"> my first heading </h1>
<p style="color: red; margin-left: 20px">
這是內聯樣式表的測試。
</p>
<hr /> <!--這是個水平線-->
<p> I
am
you
</p> <!--區塊層級元素,段落之間會自動換行,瀏覽器忽略了原始碼中的排版(省略了多餘的空格和換行),把多個空格和換行全部變成一個空格,段落的行數依賴於瀏覽器視窗的大小。如果調節瀏覽器視窗的大小,將改變段落中的行數。-->
<br /> <!--這是一個分行符號,可以用在段落裡面-->
<a href="http://www.w3school.com.cn"> This is a link</a> <!--這是個串連-->
<img src="../MINE/images/2008102992449800_2.jpg" height="300" align="middle" />
<p > 接下來是文字格式設定化的測試。 </p>
<bdo> i am fine </bdo>
<del> shit </del>
<br />
<ins > shit you </ins>
<br />
這是長的引用:
<blockquote>
這是長的引用。這是長的引用。這是長的引用。這是長的引用。這是長的引用。這是長的引用。這是長的引用。這是長的引用。這是長的引用。這是長的引用。這是長的引用。
</blockquote><!--自動插入分行符號與頁面邊界-->

這是短的引用:
<q>
這是短的引用。
</q>

<p>
使用 blockquote 元素的話,瀏覽器會插入換行和外邊距,而 q 元素不會有任何特殊的呈現。
</p>
<pre > 你是
你是一個
大人
</pre>
<div style=" color:#69C" >
<h3>This is a header</h3>
<p>This is a paragraph.</p>
</div>
</body>

</html>

這是每次練習的代碼,我主要把自己不明白的地方特別注釋,希望以後越來越規範。

網頁設計之路(1)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.