html 基礎示範代碼

來源:互聯網
上載者:User

標籤:決定   錨點   border   分行符號   rds   baidu   sub   system   ftp服務   

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title></title></head><body><center><p><font color="red" size="20px">welcome come to html!!!</font></p></center> <h1>標題標籤</h1>  <p>段落標籤</p> <!--pre定義預格式化的文本,被包圍在 pre 元素中的文本通常會保留空格和分行符號。而文本也會呈現為等寬字型。--><pre>if(20>30){System.out.println("20大於30!");}</pre><div>DIV標籤</div><hr/><h5>HTML自動在一個h1、h6、p、pre 的段落前後各添加一個空行。---->空行不是換行,是多出沒有內容的一行</h5> qw<br><br>ert<br>yuiop<h5>rwerw</h5><hr><h5>內聯標籤</h5><p><em> em:</em>強調,大部分瀏覽器渲染為斜體。</p><p><strong> strong:</strong>強調,大部分瀏覽器渲染為黑體。</p><p> sub:下標       subscript      h<sub>2</sub>o</p><p> sup:上標       superscript    2<sup>3</sup></p><p><code> code:</code>標示一段代碼</p><p><span> span:</span>一般內聯標籤</p><p>br:<br> 換行</p><p><b>b:</b> 黑體</p><p><i>i:</i> 斜體</p><hr><h5>實體字元         實體字元的格式是:AND符號(&) + 實體名 +分號(;)</h5><p>gt: > 大於符號    greater-than</p><p>lt: < 小於符號    less-than</p><p>nbsp:  不間斷 空格Non-breaking Space </p> <p>空格: END</p><p>左括弧:<</p><p>右括弧:></p><p>AND符號:&</p><p>引號:"</p><p>人民幣:¥</p><p>著作權:? copyright</p><p>註冊:?  register</p><p>乘號:×</p><p>除號:÷</p><hr><p><a name="1path"></a></p> <h5>超連結         絕對路徑</h5><a href="http://www.baidu.com/">連結到百度首頁</a><p><a href="mailto:[email protected]">開啟郵件用戶端</a></p><p><a href="https://mail.google.com/">登陸Gmail</a></p><p><a href="ftp://mail.ustc.edu.cn/">登陸科大FTP伺服器</a></p><p><a name="2path"></a></p><h5>超連結         相對路徑</h5>  <p><a href="./V1.jpg">./本目錄     也可以不寫</a></p> <p><a href="../img/xhtml1-frameset.dtd">../</a></p> <p><a href="../../V1.jpg">../../</a></p> <p><a href="/hello.java">/ 根目錄,就是直接返回到當前檔案所在的盤符的根目錄下</a></p> <p><a name="3path"></a></p><h5>超連結         target屬性(控制連結開啟的位置)</h5>  <p><a href="./V1.jpg" target="_blank">_blank  新視窗中開啟連結</a></p><p><a href="./V1.jpg" target="_self">_self  當前視窗中開啟連結(預設)</a></p><p><a href="./V1.jpg" target="_parent">_parent  父視窗中開啟連結</a></p><p><a href="./V1.jpg" target="_top">_top  最頂層父視窗中開啟連結</a></p><p><a href="./V1.jpg" target="targetname">targetname  指定視窗或Frame中開啟連結</a></p><h5>iframe__frameset</h5> <p><a href="V1.jpg" target="iframe_target">iframe</a></p> <p><a href="V1.jpg" target="frameset_target">frameset</a></p>  <iframe src="/hello.java" name="iframe_target" style="width:100%;height:500px;"></iframe><h5>onclick="javascript:window.open(‘‘,‘mywindow‘);"</h5><!--相當於建立一個iframe視窗,並且name="mywindow"--><p><a href="#" onclick="javascript:window.open(‘‘,‘mywindow‘);">開啟一個空白的新視窗</a></p> <p><a href="V1.jpg" target="mywindow">在這個新視窗中開啟“V1.jpg”</a></p> <h5>頁面錨點的使用</h5><!--在frame和iframe中用的是name屬性,同理,在描點時,用的也是name屬性,偶耶!!!--><!--區別是a用target去標記到對應的iframe的name,a用href標記到對應的對應的a的name--><p><a href="HelloWorld.html#1path">返回到  超連結  絕對路徑</a></p> <p><a href="HelloWorld.html#2path">返回到  超連結  相對路徑</a></p>  <p><a href="HelloWorld.html#3path">返回到  超連結  target屬性</a></p> <hr/><h5>圖片</h5><p><img alt="V字仇殺隊" src="V1.jpg"   height="500px" width="100%"/></p><h5>圖片連結</h5>  <p><a href="E:\影視\鞠婧禕\mv.jpg" target="_blank"><img src="../img/mv.jpg" height="200px" alt="鞠婧禕" style="border:1px solid red"></a>  <!--圖片連結去掉邊框-->    <a href="E:\影視\鞠婧禕\mv.jpg" target="_blank"><img src="../img/mv.jpg" height="200px" alt="鞠婧禕" border="0"></a></p> <!--定義和用法coords 屬性規定地區的 x 和 y 座標。    coords 屬性與 shape 屬性配合使用,來規定地區的尺寸、形狀和位置。映像左上方的座標是 "0,0"。詳細解釋:<area> 標籤的 coords 屬性定義了用戶端影像對應中對滑鼠敏感的地區的座標。座標的數字及其含義取決於 shape 屬性中決定的地區形狀。可以將用戶端影像對應中的超連結地區定義為矩形、圓形或多邊形等。下面列出了每種形狀的適當值:圓形:shape="circle",coords="x,y,z"這裡的 x 和 y 定義了圓心的位置("0,0" 是映像左上方的座標),r 是以像素為單位的圓形半徑。多邊形:shape="polygon",coords="x1,y1,x2,y2,x3,y3,..."每一對 "x,y" 座標都定義了多邊形的一個頂點("0,0" 是映像左上方的座標)。定義三角形至少需要三組座標;高緯多邊形則需要更多數量的頂點。多邊形會自動封閉,因此在列表的結尾不需要重複第一個座標來閉合整個地區。矩形:shape="rectangle",coords="x1,y1,x2,y2"第一個座標是矩形的一個角的頂點座標,另一對座標是對角的頂點座標,"0,0" 是映像左上方的座標。請注意,定義矩形實際上是定義帶有四個頂點的多邊形的一種簡化方法。例如,下面的 XHTML 片段在一個 100x100 像素映像的右下方四分之一處,定義了一個對滑鼠敏感的地區,並在映像的正中間定義了一個圓形地區。--><h5>圖片地圖</h5><p><img src="../img/mv2.jpg" alt="學習中的鞠婧禕" usemap="mv2map"/></p> <p><map name="mv2map" id="mv2map">   <!--nohref 屬性規定該地區沒有相關的連結。     nohref="nohref"--><area shape="circle" coords="20,20,20" alt="circle鞠婧禕" title="circle鞠婧禕" href="#" style="border:1px solid red;"/><area shape="rect" coords="400,0,440,20" alt="rect鞠婧禕" title="rect鞠婧禕" href="#" style="border:1px solid red;"/> </map></p> </body></html>

  

html 基礎示範代碼

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.