首先,為上課打基礎(chǔ),我按照教程指引,學(xué)習(xí)了《編程小白的第一本 Python 入門書》,感覺收獲很大,字符串、函數(shù)、循環(huán)與判斷、數(shù)據(jù)結(jié)構(gòu)list,dict,tuple,set、到最后一章的類,這些概念一直在腦子里糊里糊涂的,一下子好像明白了一些,作業(yè)都認(rèn)認(rèn)真真跟著做了。就像書里介紹,編程就是拆分清楚一件事情的邏輯關(guān)系,分成一個(gè)一個(gè)block,對(duì)于性子急躁,急于求成的我來說,是需要長(zhǎng)期的鍛煉的,學(xué)習(xí)Python是需要一直一直堅(jiān)持的事情。
自己學(xué)完第一節(jié)后編寫的網(wǎng)頁(yè)成果:

image.png
我的代碼:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>The blah</title>
<link rel="stylesheet" type="text/css" href="homework.css">
</head>
<body>
<div class="header">
<img src="images/blah.png">
<ul class="nav">
<li><a href="a">Home</a></li>
<li><a href="a">Site</a></li>
<li><a href="a">Other</a></li>
</ul>
</div>
<div class="main-content">
<h2>The Beach</h2>
<hr />
<ul class="photos">
<li><img src="images/0001.jpg" width="150" height="150"></li>
<li><img src="images/0003.jpg" width="150" height="150"></li>
<li><img src="images/0004.jpg" width="150" height="150"></li>
</ul>
<p>I would fain say something, not so much concerning the Chinese and Sandwich Islanders as you who read these pages, who are said to live in New England; something about your condition,
especially your outward condition or circumstances in this world, in this town, what it is, whether it is necessary that it be as bad as it is, whether it cannot be improved as well as not.
I have travelled a good deal in Concord; and everywhere, in shops, and offices, and fields, the inhabitants have appeared to me to be doing penance in a thousand remarkable ways. </p>
</div>
<div class="footer">
<p>? Mugglecoding</p>
</div>
</body>
</html>
我的總結(jié):
- 網(wǎng)頁(yè)通常由HTML、CSS樣式構(gòu)成。
- HTML的標(biāo)簽可以嵌套使用,常用的標(biāo)簽有:
-<div>(division/section)標(biāo)簽可以將文檔劃分為不同的區(qū)域;
-<ul>、<li>、<ol> 標(biāo)簽定義列表,<ul>定義無序列表,<ol>定義有序列表,<li>可以配合<ul>和<ol>做嵌套。
-<p>標(biāo)簽定義段落。
-<hr />標(biāo)簽定義水平分隔線。
-<h1>-<h6>定義由大到小的標(biāo)題。 - CSS樣式可以修飾網(wǎng)頁(yè),可以類比WORD內(nèi)部的樣式,作用我理解是保持網(wǎng)頁(yè)整潔有序,標(biāo)準(zhǔn)統(tǒng)一。樣式有外部樣式表定義整個(gè)文件,內(nèi)部樣式表通過在<head>部分用<style>標(biāo)簽定義內(nèi)部樣式,還有內(nèi)聯(lián)樣式在HTML元素內(nèi)部(如<div>)定義樣式,其中內(nèi)聯(lián)樣式擁有最高的優(yōu)先權(quán)。
- 掌握了Markdown語(yǔ)言的常用方法,如引用、標(biāo)題、列表、加粗/斜體、代碼引用、鏈接和圖片等。