HTML

It is impossible to create a Web page without HTML. HTML houses your content and describes its meaning. In turn, Web browsers render HTML-encased content for users.

  1. Text content

  2. Reference to other file

  3. Markup

Markup is essential, because it describes the content's meaning.
Everything above the <body> start tag is the instructional information.

  • Elements

'Elements' are the pieces themselves, i.e. a paragraph is an element, or a header is an element, even the body is an element. Most elements can contain other elements, as the body element would contain header elements, paragraph elements, in fact pretty much all of the visible elements of the DOM(Document Object Model, 文檔對象類型).

  • Tags

'Tags' are what we use to organize a text file (which is just a long string of characters) such that it represents a tree of elements that make up the HTML document. Tags are not the elements themselves, rather they're the bits of text you use to tell the computer where an element begins and ends.

?When you 'mark up' a document, you generally don't want those extra notes that are not really part of the text to be presented to the reader. HTML borrows a technique from another language, SGML, to provide an easy way for a computer to determine which parts are "Mark Up" and which parts are the content. By using '<' and '>' as a kind of parentheses, HTML can indicate the beginning and end of a tag, i.e. the presence of '<' tells the browser 'this next bit is markup, pay attention'.

?Whatever that tag (or 'open tag') does, it applies to the content following the tag. Unless you want that to be the entire rest of the document, you need to indicate when to stop using that tag and do something else, so '<' and '>' are again used. Since elements are typically nested within other elements, the browser needs to be able to distinguish between the end of the current tag or the beginning of a new tag (representing a nested element). This is done by adding a '/' right after the '<' to indicated that it's a 'close tag'.

?For example, the '<em>' tag is used for element that needs Emphasis. The '<' and '>' indicate that this is a tag, and the "little bits of text" in between tell us what kind of tag it is. To completely describe the element, it needs an open and close tag, with everything in between the tags is the contents of the element:

  • Attributes

    • body

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
  • 序言:七十年代末志电,一起剝皮案震驚了整個濱河市蛔趴,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌孝情,老刑警劉巖,帶你破解...
    沈念sama閱讀 207,113評論 6 481
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件魁亦,死亡現(xiàn)場離奇詭異洁奈,居然都是意外死亡绞灼,警方通過查閱死者的電腦和手機,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 88,644評論 2 381
  • 文/潘曉璐 我一進店門印叁,熙熙樓的掌柜王于貴愁眉苦臉地迎上來军掂,“玉大人,你說我怎么就攤上這事肠虽♂O罚” “怎么了?”我有些...
    開封第一講書人閱讀 153,340評論 0 344
  • 文/不壞的土叔 我叫張陵韩玩,是天一觀的道長。 經(jīng)常有香客問我陆馁,道長,這世上最難降的妖魔是什么击狮? 我笑而不...
    開封第一講書人閱讀 55,449評論 1 279
  • 正文 為了忘掉前任彪蓬,我火速辦了婚禮,結果婚禮上档冬,老公的妹妹穿的比我還像新娘桃纯。我一直安慰自己,他們只是感情好态坦,可當我...
    茶點故事閱讀 64,445評論 5 374
  • 文/花漫 我一把揭開白布伞梯。 她就那樣靜靜地躺著,像睡著了一般琐旁。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上灰殴,一...
    開封第一講書人閱讀 49,166評論 1 284
  • 那天牺陶,我揣著相機與錄音,去河邊找鬼掰伸。 笑死怀估,一個胖子當著我的面吹牛合搅,可吹牛的內容都是我干的歧蕉。 我是一名探鬼主播,決...
    沈念sama閱讀 38,442評論 3 401
  • 文/蒼蘭香墨 我猛地睜開眼赌髓,長吁一口氣:“原來是場噩夢啊……” “哼催跪!你這毒婦竟也來了?” 一聲冷哼從身側響起匿沛,我...
    開封第一講書人閱讀 37,105評論 0 261
  • 序言:老撾萬榮一對情侶失蹤榛鼎,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后抡笼,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 43,601評論 1 300
  • 正文 獨居荒郊野嶺守林人離奇死亡推姻,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內容為張勛視角 年9月15日...
    茶點故事閱讀 36,066評論 2 325
  • 正文 我和宋清朗相戀三年藏古,在試婚紗的時候發(fā)現(xiàn)自己被綠了忍燥。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 38,161評論 1 334
  • 序言:一個原本活蹦亂跳的男人離奇死亡厂捞,死狀恐怖队丝,靈堂內的尸體忽然破棺而出,到底是詐尸還是另有隱情机久,我是刑警寧澤,帶...
    沈念sama閱讀 33,792評論 4 323
  • 正文 年R本政府宣布胧弛,位于F島的核電站,受9級特大地震影響叶圃,放射性物質發(fā)生泄漏践图。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 39,351評論 3 307
  • 文/蒙蒙 一德崭、第九天 我趴在偏房一處隱蔽的房頂上張望揖盘。 院中可真熱鬧,春花似錦兽狭、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,352評論 0 19
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至伐庭,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間圾另,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 31,584評論 1 261
  • 我被黑心中介騙來泰國打工淳衙, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留饺著,地道東北人。 一個月前我還...
    沈念sama閱讀 45,618評論 2 355
  • 正文 我出身青樓靴跛,卻偏偏與公主長得像渡嚣,于是被迫代替她去往敵國和親肥印。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當晚...
    茶點故事閱讀 42,916評論 2 344

推薦閱讀更多精彩內容