SGK Tin học 12 Cánh diều Bài 11. Mô hình hộp, bố cục trang web có đáp án
6 câu hỏi
Bước 1.Tạotệp “Bài 10-NV1.css”
Mởphầnmềm Sublime Text.
Tạotệpmớivàghilưuvớitên Bài10-NV1.css.
Bước 2. Khai báocácquytắcđịnhdạng CSS nhưsau:
.blue {coler: steelblue;}
.red {coler: darkred;}
.orangered {font-family: “verdana”; -webkit-tap-highlight-color: transparent; margin: 0px; padding: 0px; user-select: text; background-repeat: repeat-x; background-position: left bottom; background-image: var(--urlSpellingErrorV2, ); border-bottom: 1px solid transparent;">orangered:}
input.yellow {background-color: yellow; }input.blue {background-color: blue; color: white;}
P{margin: 30px;}
p.custom-boder {padding: 20px; boder-style:solid;}
Bước 3. Ghi lưutệp.
Code nhưsau:
<!DOCTYPE html>
<html> <head>
<title>Xácđịnhvịtrítuyệtđối</title> <meta charset="utf-8">
<style>
region {padding: 20px; border-style: solid;}
.header {background-color: Lightcyan;}
navigation_menu{background-color: Lightgray; height: 50px;} .content {background-color: Lightsalmon; height: 300px;} .footer {background-color: Lightgray;}
</style>
</head>
<body>
<div class="header region">Phầnđầutrang</div>
<div class="navigation_menu region">Thanh điềuhướng</div> <div class="content region">Phầnnội dung</div> <div class="footer region">Phầnchântrang</div>
</body>
</html>
Kếtquả:

Cho khaibáođịnhdạngsau: p{height: 50 px; padding:5px; border: 2px solid; margin: 4px;}. Khi đóchiềucaocủaphầntử p tínhtheo pixel là bao nhiêu?
A. 60px
B. 72px
C. 54px
D. 64px
Cầnthiếtlậphiểnthịtheodònghoặctheokhốiđểtạotrang web như ở Hình 7, mỗiphátbiểudướiđâylàdúng hay sai?
a) Theo mặcđịnh, cácphầntử input đượchiểnthịtheokhốinênkhikhaibáocácphầntử input trongvănbản HTML khôngcầnxácđịnhthuộctính display màcácđiềukhiểntrênbiểumẫuvẫnhiểnthịđúngnhưyêucầu.
b) Đểhiểnthịnhưyêucầucầnđịnhdạngcác label đượchiểnthịtheokhốibằngkhaibáođịnhdạng label {display: block}. Phần body củavănbản HTML
khaibáonhưsau:
<body> <form>
<lable>Họtên<input type=”text name=”txten”></lable>
<lable>Địachỉ<input type=”text name=”txDiachi”></lable>
<input type=”sumbmit” name = cmd value =”đồng ý”>
<input type=”sumbmit” name = cmd value =”huỷbỏ”>
</body> </form>
c) Đểhiểnthịnhưyêucầucầnđịnhdạngcác label đượchiểnthịtheokhốibằngkhaibáo label {display: block}. Phần body củavănbản HTML khaibáonhưsau:
<body> <form>
<label>Họtên</label><input type="text" name="txtTen">
<label>Ɖia chi<label><input type="text" name="txtDiachi"> <input type="submit" name="cmd" value="Đồng ý">
<input type="submit" name="cmd" value="Huy bo"> </form></body>
d) Theo mặcđịnh, cácphầntửinputđượchiểnthịtheodòngnêncầnkhaibáođịnhdạnghiểnthịtheokhốichohai ô text nhậpdữliệu .bl {display: block}. Phần body củavănbảnHTML khaibáonhưsau:
<body> <form>
<label>11o tên<input class="bl" type="text" name="txtTen"></label>
<label>Dia chi<input class="bl" type="text" name="txtDiachi"></label>
<input type="submit" name "cmd" value "Dong y">
<input type="submit" name="cmd" value-"Huỷbo">
</form> </body>
a) Sai
b) Sai
c) Sai
d) Đúng



