整合營銷服務商

          電腦端+手機端+微信端=數據同步管理

          免費咨詢熱線:

          計算機二級Web(3):HTML語言基礎(習題)

          . HTML是一種標記語言,它是由(C)解釋執行的

          A.不需要解釋

          B.Windows

          C.瀏覽器

          D.標記語言處理軟件

          2.在HTML文檔中用于表示頁面標題的標記對是(D)

          A. <head></head>

          B. <header></header>

          C. <caption> </caption>

          D. <title></title>

          3.在HTML文檔中用于表示表格的標記對是(C)

          A. <head></head>

          B.<header></header>

          C. <table></table>

          D.<caption></caption>

          4.在HTML文檔中使用的注釋符號是(C )。

          A. //...

          B. /* ....*/

          C.<! --.......-->

          D.以上都不是

          5.為了標識一個HTML文件,應該使用的HTML標記是(C )。

          A. <p></p>

          B. <head></head>

          C. <html></html>

          D.<form></form>

          6.在下列的HTML中,最大的標題是(D)

          A. <h6>

          B. <head>

          C.<heading>

          D.<h1>

          7.在HTML中要定義一一個書簽,應該使用的語句是(B ) 。

          A. <a href="#object_01">text</a>

          B. <a name="object _01">text</a>

          C. <a target="#object_01">text</a>

          D. <a link="#object_ 01" >text</a>

          8. 如果要在表單中創建一個普通文本框,下列標記中正確的是( A )。

          A. <input type="text" >

          B. <input type ="password" >

          C. <input type="checkbox" >

          D. <input type ="radio" >

          9. 下列標記中不屬于行內元素的是( D)。

          A. <em>

          B. <font>

          C. <input>

          D. <div>

          10.下列標記中可以產生粗體字的HTML標記是( C)。

          A. <bold>

          B. <bb>

          C. <b>

          D. <i>

          11.在下列的HTML中,正確產生超鏈接的標記是(B)。

          A. <a url="http://www. sina. com. cn">新浪網</a>

          B. <a href="http://www. sina. com. cn">新浪網</a>

          C. <a>http://www. sina. com. cn</a>

          D. <a name=" http://www. sina. com. cn" >新浪網</a>

          12.以下語句中,正確制作電子郵件鏈接的是(C)。

          A. <a href="xxx@ yyy">

          B. <mail href="xxx@ yyy" >

          C. <a href="mailto:xxx@ yyy">

          D. <mail>xxx@ yyy</ mail>

          13.以下選項中,全部都是表格標記的是( B )。

          A. <table> <head><tfoot>

          B. <table><tr><td>

          C. <table><tr><tt>

          D. <thead> <body><tr>

          14.下列語句中,能產生帶有數字列表符號的列表標記是(C)。

          A. <ul>

          B. <dl>

          C. <ol>

          D. <list>

          15.在下列選項中,正確地產生文本區( textarea)的標記是(A ) 。

          A . <textarea>

          B. <input type =”textarea" >

          C. <input type =”textbox" >

          D. <input type="text:">

          計算機二級Web(3):HTML語言基礎 (下)

          計算機二級Web(3):HTML語言基礎 (上)

          家好,我是IT共享者,人稱皮皮。這篇文章我們來講講CSS的文本樣式。

          一、文本顏色Color

          顏色屬性被用來設置文字的顏色。

          顏色是通過CSS最經常的指定:

          • 十六進制值 - 如"#FF0000"。
          • 一個RGB值 - "RGB(255,0,0)"。
          • 顏色的名稱 - 如"紅"。

          一個網頁的文本顏色是指在主體內的選擇:

          <html>
              <head>
                  <meta charset="utf-8">
                  <meta name="viewport" content="width=640, user-scalable=no">
                  <title>項目</title>
                  <style>
                      body {
                          color: blue;
                      }
          
          
                      h1 {
                          color: #00ff00;
                      }
          
          
                      h2 {
                          color: rgb(255, 0, 0);
                      }
          </style>
              </head>
          
          
              <body>
                  <h2>hello world</h2>
                  <h1>welcome to CaoZhou</h1>
              </body>
          
          
          </html>

          注:對于W3C標準的CSS:如果你定義了顏色屬性,你還必須定義背景色屬性。


          二、屬性

          1. text-align 文本的對齊方式

          文本排列屬性是用來設置文本的水平對齊方式。

          文本可居中或對齊到左或右,兩端對齊。

          當text-align設置為"justify",每一行被展開為寬度相等,左,右外邊距是對齊(如雜志和報紙)。

          <!doctype html>
          <html lang="en">
          
          
              <head>
                  <meta charset="UTF-8">
                  <title>Document</title>
                  <style>
                      h1 {
                          text-align: center;
                      }
          
          
                      p.date {
                          text-align: right;
                      }
          
          
                      p.main {
                          text-align: justify;
                      }
          </style>
              </head>
          
          
              <body>
          
          
                  <p class="date">2015 年 3 月 14 號</p>
                  <p class="main"> 從前有個書生,和未婚妻約好在某年某月某日結婚。到那一天,未婚妻卻嫁給了別人。書生受此打擊, 一病不起。  這時,路過一游方僧人,從懷里摸出一面鏡子叫書生看。書生看到茫茫大海,一名遇害的女子一絲不掛地躺在海灘上。路過一人, 看一眼,搖搖頭,走了。又路過一人,將衣服脫下,給女尸蓋上,走了。再路過一人,過去,挖個坑,小心翼翼把尸體掩埋了。  僧人解釋道, 那具海灘上的女尸,就是你未婚妻的前世。你是第二個路過的人,曾給過他一件衣服。她今生和你相戀,只為還你一個情。但是她最終要報答一生一世的人,是最后那個把她掩埋的人,那人就是他現在的丈夫。書生大悟,病愈。
          
          
                  </p>
                  <p><b>注意:</b> 重置瀏覽器窗口大小查看 "justify" 是如何工作的。</p>
              </body>
          
          
          </html>

          2. text-decoration文本修飾

          text-decoration 屬性用來設置或刪除文本的裝飾。

          從設計的角度看 text-decoration屬性主要是用來刪除鏈接的下劃線:

          <!doctype html>
          <html lang="en">
          
          
              <head>
                  <meta charset="UTF-8">
                  <title>Document</title>
                  <style>
                      .none {}
          
          
                      .del {
                          text-decoration: none;
                      }
          </style>
              </head>
          
          
              <body>
                  <p>原來的樣子</p>
                  <a href="#" class="none">wwwwwwwwwwwwwwwwww</a>
                  <p>去掉下劃線</p>
                  <a href="#" class="del">wwwwwwwwwwwwwwwwwwwww</a>
              </body>
          
          
          </html>

          也可以這樣裝飾文字:

          <html>
              <head>
                  <meta charset="utf-8">
                  <meta name="viewport" content="width=640, user-scalable=no">
                  <title>項目</title>
                  <style>
                      h1 {
                          text-decoration: overline;
                      }
          
          
                      h2 {
                          text-decoration: line-through;
                      }
          
          
                      h3 {
                          text-decoration: underline;
                      }
          </style>
              </head>
          
          
              <body>
                  <h1>This is heading 1</h1>
                  <h2>This is heading 2</h2>
                  <h3>This is heading 3</h3>
              </body>
          
          
          </html>

          注:不建議強調指出不是鏈接的文本,因為這常常混淆用戶。


          3. text-transform文本轉換

          text-transform文本轉換屬性是用來指定在一個文本中的大寫和小寫字母。

          • uppercase:轉換為全部大寫。
          • lowercase:轉換為全部小寫。
          • capitalize :每個單詞的首字母大寫。
          <!DOCTYPE html>
          <html>
          
          
              <head>
                  <meta charset="utf-8">
                  <meta name="viewport" content="width=640, user-scalable=no">
                  <title>項目</title>
                  <style>
                      p.uppercase {
                          text-transform: uppercase;
                      }
          
          
                      p.lowercase {
                          text-transform: lowercase;
                      }
          
          
                      p.capitalize {
                          text-transform: capitalize;
                      }
          </style>
              </head>
          
          
              <body>
                  <p class="uppercase">This is some text.</p>
                  <p class="lowercase">This is some text.</p>
                  <p class="capitalize">This is some text.</p>
              </body>
          
          
          </html>

          4. text-indent文本縮進

          text-indent文本縮進屬性是用來指定文本的第一行的縮進。

          p {text-indent:50px;}

          5. letter-spacing 設置字符間距

          增加或減少字符之間的空間。

          <style>
               h1 {
                 letter-spacing:2px;
          }
                h2 {
                  letter-spacing:-3px;
          }
          </style>

          6. line-height設置行高

          指定在一個段落中行之間的空間。

          <html>
              <head>
                  <meta charset="utf-8">
                  <meta name="viewport" content="width=640, user-scalable=no">
                  <title>項目</title>
                  <style>
                      p.small {
                          line-height: 70%;
                      }
          
          
                      p.big {
                          line-height: 200%;
                      }
          </style>
              </head>
          
          
              <body>
                  <p>
                      This is a paragraph with a standard line-height.<br> This is a paragraph with a standard line-height.<br> The default line height in most browsers is about 110% to 120%.<br>
                  </p>
          
          
                  <p class="small">
                      This is a paragraph with a smaller line-height.<br> This is a paragraph with a smaller line-height.<br> This is a paragraph with a smaller line-height.<br> This is a paragraph with a smaller line-height.<br>
                  </p>
          
          
                  <p class="big">
                      This is a paragraph with a bigger line-height.<br> This is a paragraph with a bigger line-height.<br> This is a paragraph with a bigger line-height.<br> This is a paragraph with a bigger line-height.<br>
                  </p>
          
          
              </body>
          
          
          </html>

          7. word-spacing 設置字間距

          增加一個段落中的單詞之間的空白空間。

          <html>
              <head>
                  <meta charset="utf-8">
                  <meta name="viewport" content="width=640, user-scalable=no">
                  <title>項目</title>
                  <style type="text/css">
                      p {
                          word-spacing: 30px;
                      }
          </style>
              </head>
          
          
              <body>
          
          
                  <p>
                      This is some text. This is some text.
                  </p>
          
          
              </body>
          
          
          </html>

          8. vertical-align 設置元垂直居中

          設置文本的垂直對齊圖像。

          <html>
              <head>
                  <meta charset="utf-8">
                  <meta name="viewport" content="width=640, user-scalable=no">
                  <title>項目</title>
                  <style>
                      img{
                          width: 200px;
                          height: 100px;
                      }
                      img.top {
                          vertical-align: text-top;
          
          
                      }
          
          
                      img.bottom {
                          vertical-align: text-bottom;
          
          
                      }
          </style>
              </head>
          
          
              <body>
                  <p>An <img src="img/logo.png"  /> image with a default alignment.</p>
                  <p>An <img class="top" src="img/logo.png" /> image with a text-top alignment.</p>
                  <p>An <img class="bottom" src="img/logo.png" /> image with a text-bottom alignment.</p>
              </body>
          
          
          </html>

          9. text-shadow 設置文本陰影

          設置文本陰影。

          <html>
              <head>
                  <meta charset="utf-8">
                  <meta name="viewport" content="width=640, user-scalable=no">
                  <title>項目</title>
                  <style>
                   h1{
                      text-shadow: 2px 2px #FF0000;
               }
          </style>
              </head>
          
          
              <body>
              <h1>Text-shadow effect</h1>
              </body>
          
          
          </html>

          三、總結

          本文主要介紹了CSS文本樣式實際應用中應該如何去操作,通過講解文本中對應的屬性去改變文本的表現形式。使用豐富的效果圖的展示,能夠更直觀的看到運行的效果,能夠更好的理解。使用Html語言,代碼結構更佳的清晰,能夠幫助你更好的學習。

          .我們可以在下列哪個 HTML 元素中放置 Javascript 代碼?()

          A.<script>

          B.<javascript>

          C.<js>

          D.<scripting>

          2.寫 "Hello World" 的正確 Javascript 語法是?()

          A.("Hello World")

          B."Hello World"

          C.response.write("Hello World")

          D.document.write("Hello World")

          3.插入 Javacript 的正確位置是?()

          A.<body>部分

          B.<head>部分

          C.<body>部分和<head>部分均可

          4.引用名為 "xxx.js" 的外部腳本的正確語法是?()

          A.<script src="xxx.js">

          B.<script href="xxx.js">

          C.<script name="xxx.js">

          5.如何在警告框中寫入 "Hello World"?()

          A.alertBox="Hello World"

          B.msgBox("Hello World")

          C.alert("Hello World")

          D.alertBox("Hello World")

          6.如何創建函數?()

          A.function:myFunction()

          B.function myFunction()

          C.function=myFunction()

          7.如何調用名為 "myFunction" 的函數?()

          A.call function myFunction

          B.call myFunction()

          C.myFunction()

          8.如何編寫當 i 等于 5 時執行一些語句的條件語句?()

          A.if (i==5)

          B.if i=5 then

          C.if i=5

          D.if i==5 then

          9.如何編寫當 i 不等于 5 時執行一些語句的條件語句?()

          A.if =! 5 then

          B.if >< 5

          C.if (i >< 5)

          D.if (i != 5)

          10.在 JavaScript 中,有多少種不同類型的循環?()

          A.兩種。for 循環和 while 循環。

          B.四種。for 循環、while 循環、do...while 循環以及 loop...until 循環。

          C.一種。for 循環。

          11.for 循環如何開始?()

          A.for (i <= 5; i++)

          B.for (i = 0; i <= 5; i++)

          C.for (i = 0; i <= 5)

          D.for i = 1 to 5

          12.如何在 JavaScript 中添加注釋?()

          A.' This is a comment

          B.<!--This is a comment-->

          C.//This is a comment

          13.可插入多行注釋的 JavaScript 語法是?()

          A./*This comment has more than one line*/

          B.//This comment has more than one line//

          C.<!--This comment has more than one line-->

          14.定義 JavaScript 數組的正確方法是?()

          A.var txt = new Array="George","John","Thomas"

          B.var txt = new Array(1:"George",2:"John",3:"Thomas")

          C.var txt = new Array("George","John","Thomas")

          D.var txt = new Array:1=("George")2=("John")3=("Thomas")


          15.如何把 7.25 四舍五入為最接近的整數?()

          A.round(7.25)

          B.rnd(7.25)

          C.Math.rnd(7.25)

          D.Math.round(7.25)

          16.如何求得 2 和 4 中最大的數?()

          A.Math.ceil(2,4)

          B.Math.max(2,4)

          C.ceil(2,4)

          D.top(2,4)

          17.打開名為 "window2" 的新窗口的 JavaScript 語法是?()

          A.open.new("http://www.w3cschool.cn","window2")

          B.new.window("http://www.w3cschool.cn","window2")

          C.new("http://www.w3cschool.cn","window2")

          D.window.open("http://www.w3cschool.cn","window2")


          18.如何在瀏覽器的狀態欄放入一條消息?()

          A.statusbar = "put your message here"

          B.window.status = "put your message here"

          C.window.status("put your message here")

          D.status("put your message here")

          19.如何獲得客戶端瀏覽器的名稱?()

          A.client.navName

          B.navigator.appName

          C.browser.name

          20.外部腳本必須包含 <script> 標簽。()

          A.正確

          B.錯誤

          請把你的答案寫在留言區。^_^


          主站蜘蛛池模板: 国产未成女一区二区三区| 久久福利一区二区| 免费无码VA一区二区三区| 国产凹凸在线一区二区| 一区二区三区日本视频| 久久精品一区二区东京热| 国产伦精品一区二区三区女| 在线精品一区二区三区电影| 一区二区日韩国产精品| 国产一区二区久久久| 91麻豆精品国产自产在线观看一区 | 精品一区二区三区AV天堂| 国模少妇一区二区三区| 日本丰满少妇一区二区三区 | 亚洲欧美国产国产综合一区| 一区二区三区免费视频播放器| 中文字幕日韩一区二区不卡| 亚洲一区二区三区AV无码| 国产精品被窝福利一区 | 久久亚洲综合色一区二区三区| 国产嫖妓一区二区三区无码| 亚洲欧美日韩中文字幕在线一区 | www一区二区www免费| 日韩一区二区三区不卡视频| 2021国产精品视频一区| 亚洲av不卡一区二区三区| 亚洲一区二区三区电影| 精品亚洲一区二区| 久久99精品波多结衣一区| 亚洲国产成人一区二区精品区| 岛国精品一区免费视频在线观看| 久久毛片免费看一区二区三区 | 插我一区二区在线观看| 后入内射国产一区二区| 国产在线一区二区视频| 午夜肉伦伦影院久久精品免费看国产一区二区三区 | 国产主播福利一区二区| 在线成人一区二区| 老鸭窝毛片一区二区三区| 久夜色精品国产一区二区三区| 日韩精品无码一区二区视频|