{"id":1394,"date":"2015-01-03T11:48:04","date_gmt":"2015-01-03T04:48:04","guid":{"rendered":"https:\/\/webvn.com\/?p=1394"},"modified":"2015-10-10T21:07:48","modified_gmt":"2015-10-10T14:07:48","slug":"thanh-phan-html","status":"publish","type":"post","link":"https:\/\/webvn.com\/thanh-phan-html\/","title":{"rendered":"Th\u00e0nh ph\u1ea7n HTML"},"content":{"rendered":"

M\u1ed9t trang HTML \u0111\u01b0\u1ee3c t\u1ea1o ra nh\u1edd c\u00e1c th\u00e0nh ph\u1ea7n HTML<\/strong>.<\/p>\n

<\/div>
<\/div>\n

Th\u00e0nh ph\u1ea7n HTML<\/h2>\n

Th\u00e0nh ph\u1ea7n trong HTML \u0111\u01b0\u1ee3c t\u1ea1o n\u00ean b\u1edfi th\u1ebb m\u1edf<\/strong>, th\u1ebb \u0111\u00f3ng<\/strong> v\u00e0 n\u1ed9i dung<\/strong> \u1edf gi\u1eefa 2 th\u1ebb<\/p>\n

<th\u1ebb><\/span>n\u1ed9i dung<\/th\u1ebb><\/span><\/span><\/p>\n

Th\u00e0nh ph\u1ea7n HTML l\u00e0 m\u1ecdi th\u1ee9 t\u1eeb th\u1ebb m\u1edf t\u1edbi th\u1ebb \u0111\u00f3ng<\/p>\n

<p><\/span>\u0110\u00e2y l\u00e0 \u0111o\u1ea1n v\u0103n b\u1ea3n<\/p><\/span><\/span><\/p>\n\n\n\n\n\t\n\n\t\n\t\n\t
Th\u1ebb m\u1edf<\/th>N\u1ed9i dung<\/th>Th\u1ebb \u0111\u00f3ng<\/th>\n<\/tr>\n<\/thead>\n
<h1><\/td>\u0110\u1ec1 m\u1ee5c l\u1edbn<\/td><\/h1><\/td>\n<\/tr>\n
<p><\/td>\u0110o\u1ea1n v\u0103n b\u1ea3n<\/td><\/p><\/td>\n<\/tr>\n
<br><\/td>\u00a0<\/td>\u00a0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n

Ch\u00fa \u00fd:<\/strong> M\u1ed9t v\u00e0i th\u00e0nh ph\u1ea7n HTML kh\u00f4ng c\u00f3 th\u1ebb \u0111\u00f3ng.<\/p>\n

<\/div>
<\/div>\n

Th\u00e0nh ph\u1ea7n HTML l\u1ed3ng nhau<\/h2>\n

C\u00e1c th\u00e0nh ph\u1ea7n c\u1ee7a HTML c\u00f3 th\u1ec3 l\u1ed3ng v\u00e0o nhau (th\u00e0nh ph\u1ea7n n\u00e0y ch\u1ee9a th\u00e0nh ph\u1ea7n kia).<\/p>\n

V\u00ed d\u1ee5 d\u01b0\u1edbi \u0111\u00e2y ch\u1ee9a 4 th\u00e0nh ph\u1ea7n HTML:<\/p>\n\r\n\r\n\r\n\r\n\t\t

\r\n\t\t\r\n\t\t\t
<\/div>\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t
\r\n\t\t\t\t\t
1<\/div>
2<\/div>
3<\/div>
4<\/div>
5<\/div>
6<\/div>
7<\/div>
8<\/div>
9<\/div><\/div>\r\n\t\t\t\t<\/td>\r\n\t\t\t\t\t\t
<<\/span>!<\/span>DOCTYPE <\/span>html<\/span>><\/span><\/div>
<<\/span>html<\/span>><\/span><\/div>
 <\/div>
<<\/span>body<\/span>><\/span><\/div>
<<\/span>h1<\/span>><\/span>\u0110\u1ec1 <\/span>m<\/span>\u1ee5c<\/span><<\/span>\/h1<\/span>><\/span><\/div>
<<\/span>p<\/span>><\/span>N<\/span>\u1ed9i<\/span> <\/span>dung<\/span> <\/span>\u0111o<\/span>\u1ea1n<\/span> <\/span>v<\/span>\u0103n<\/span> <\/span>b<\/span>\u1ea3n<\/span>.<\/span><<\/span>\/p<\/span>><\/span><\/div>
<<\/span>\/body<\/span>><\/span><\/div>
 <\/div>
<<\/span>\/html<\/span>><\/span><\/div><\/div><\/td>\r\n\t\t\t\t\t<\/tr>\r\n\t\t\t\t<\/table>\r\n\t\t\t<\/div>\r\n\t\t<\/div>\r\n\r\n

Demo<\/a><\/p>\n

<\/div>
<\/div>\n

Gi\u1ea3i th\u00edch v\u1ec1 v\u00ed d\u1ee5<\/h2>\n

Th\u00e0nh ph\u1ea7n <html><\/strong> \u0111\u1ecbnh ngh\u0129a to\u00e0n b\u1ed9 trang.<\/p>\n

N\u00f3 c\u00f3 th\u1ebb m\u1edf<\/strong> l\u00e0 <html> v\u00e0 th\u1ebb \u0111\u00f3ng<\/strong> <\/html>.<\/p>\n

N\u1ed9i dung trong th\u00e0nh ph\u1ea7n <HTML> l\u00e0 m\u1ed9t th\u00e0nh ph\u1ea7n HTML kh\u00e1c (th\u00e0nh ph\u1ea7n <body>).<\/p>\n

<html>\r\n\r\n<body>\r\n <h1>\u0110\u1ec1 m\u1ee5c<\/h1>\r\n <p>N\u1ed9i dung \u0111o\u1ea1n v\u0103n b\u1ea3n.<\/p>\r\n<\/body>\r\n\r\n<\/html><\/pre>\n

Th\u00e0nh ph\u1ea7n <body><\/strong> \u0111\u1ecbnh ngh\u0129a n\u1ed9i dung trang.<\/p>\n

N\u00f3 c\u00f3 th\u1ebb m\u1edf<\/strong> l\u00e0 <body>\u00a0v\u00e0 th\u1ebb \u0111\u00f3ng<\/strong> <\/body>.<\/p>\n

Th\u00e0nh ph\u1ea7n n\u1ed9i dung ch\u1ee9a 2 th\u00e0nh ph\u1ea7n HTML kh\u00e1c (<h1> v\u00e0 <p>).<\/p>\n

<body>\r\n <h1>\u0110\u1ec1 m\u1ee5c<\/h1>\r\n <p>N\u1ed9i dung \u0111o\u1ea1n v\u0103n b\u1ea3n.<\/p>\r\n<\/body><\/pre>\n

Th\u00e0nh ph\u1ea7n <h1> \u0111\u1ecbnh ngh\u0129a \u0111\u1ec1 m\u1ee5c c\u1ee7a trang.<\/p>\n

N\u00f3 c\u00f3 th\u1ebb m\u1edf<\/strong> l\u00e0 <h1> v\u00e0 th\u1ebb \u0111\u00f3ng<\/strong> <\/h1>.<\/p>\n

N\u1ed9i dung<\/strong> th\u00e0nh ph\u1ea7n l\u00e0: \u0110\u1ec1 m\u1ee5c<\/p>\n

<h1>\u0110\u1ec1 m\u1ee5c<\/h1><\/pre>\n

Th\u00e0nh ph\u1ea7n <p> \u0111\u1ecbnh ngh\u0129a m\u1ed9t \u0111o\u1ea1n v\u0103n b\u1ea3n.<\/p>\n

N\u00f3 c\u00f3 th\u1ebb m\u1edf<\/strong> l\u00e0 <p> v\u00e0 th\u1ebb \u0111\u00f3ng<\/strong> <\/p>.<\/p>\n

N\u1ed9i dung<\/strong> th\u00e0nh ph\u1ea7n l\u00e0 : N\u1ed9i dung \u0111o\u1ea1n v\u0103n b\u1ea3n.<\/p>\n

<p>N\u1ed9i dung \u0111o\u1ea1n v\u0103n b\u1ea3n.<\/p><\/pre>\n
<\/div>
<\/div>\n

\u0110\u1eebng qu\u00ean th\u1ebb \u0111\u00f3ng<\/h2>\n

M\u1ed9t v\u00e0i th\u00e0nh ph\u1ea7n HTML v\u1eabn s\u1ebd hi\u1ec3n th\u1ecb \u0111\u00fang n\u1ebfu b\u1ea1n qu\u00ean th\u1ebb \u0111\u00f3ng:<\/p>\n

<html>\r\n\r\n<body>\r\n  <p>\u0110\u00e2y l\u00e0 \u0111o\u1ea1n v\u0103n b\u1ea3n\r\n  <p>\u0110\u00e2y l\u00e0 \u0111o\u1ea1n v\u0103n b\u1ea3n\r\n<\/body>\r\n\r\n<\/html><\/pre>\n

V\u00ed d\u1ee5 \u1edf tr\u00ean v\u1eabn hi\u1ec3n th\u1ecb \u0111\u00fang tr\u00ean t\u1ea5t c\u1ea3 c\u00e1c tr\u00ecnh duy\u1ec7t b\u1edfi v\u00ec th\u1ebb \u0111\u00f3ng \u0111\u01b0\u1ee3c coi l\u00e0 kh\u00f4ng b\u1eaft bu\u1ed9c.<\/p>\n

\u0110\u1eeaNG BAO GI\u1edc L\u00c0M \u0110I\u1ec0U N\u00c0Y. N\u00f3 c\u00f3 th\u1ec3 mang l\u1ea1i k\u1ebft qu\u1ea3 ho\u1eb7c nh\u1eefng l\u1ed7i kh\u00f4ng mong mu\u1ed1n n\u1ebfu b\u1ea1n qu\u00ean th\u1ebb \u0111\u00f3ng.<\/p>\n

<\/div>
<\/div>\n

Th\u00e0nh ph\u1ea7n HTML r\u1ed7ng<\/h2>\n

Th\u00e0nh ph\u1ea7n HTML kh\u00f4ng c\u00f3 n\u1ed9i dung \u0111\u01b0\u1ee3c g\u1ecdi l\u00e0 th\u00e0nh ph\u1ea7n r\u1ed7ng.<\/p>\n

<br> l\u00e0 m\u1ed9t th\u00e0nh ph\u1ea7n r\u1ed7ng kh\u00f4ng c\u00f3 th\u1ebb \u0111\u00f3ng (Th\u1ebb <br> d\u00f9ng \u0111\u1ec3 xu\u1ed1ng d\u00f2ng).<\/p>\n

Th\u00e0nh ph\u1ea7n r\u1ed7ng c\u00f3 th\u1ec3 “\u0111\u00f3ng” ngay trong th\u1ebb m\u1edf: <br \/>.<\/p>\n

HTML5 kh\u00f4ng y\u00eau c\u1ea7u th\u1ebb r\u1ed7ng c\u1ea7n ph\u1ea3i \u0111\u00f3ng. Nh\u01b0ng n\u1ebfu b\u1ea1n mu\u1ed1n m\u00e3 ngu\u1ed3n m\u00ecnh vi\u1ebft ch\u1eb7t ch\u1ebd h\u01a1n, \u0111\u1ec3 c\u00e1c c\u00f4ng c\u1ee5 ph\u00e2n t\u00edch c\u00fa ph\u00e1p XML c\u00f3 th\u1ec3 \u0111\u1ecdc \u0111\u01b0\u1ee3c, h\u00e3y \u0111\u00f3ng t\u1ea5t c\u1ea3 c\u00e1c th\u1ebb HTML.<\/p>\n

<\/div>
<\/div>\n

Vi\u1ebft th\u01b0\u1eddng c\u00e1c th\u1ebb HTML<\/h2>\n

Th\u1ebb HTML kh\u00f4ng ph\u00e2n bi\u1ec7t vi\u1ebft hoa, vi\u1ebft th\u01b0\u1eddng: <P> c\u0169ng t\u01b0\u01a1ng t\u1ef1 nh\u01b0 <p>.<\/p>\n

Chu\u1ea9n HTML5 kh\u00f4ng y\u00eau c\u1ea7u vi\u1ebft th\u01b0\u1eddng nh\u01b0ng t\u1ed5 ch\u1ee9c W3C khuy\u1ebfn c\u00e1o n\u00ean vi\u1ebft th\u01b0\u1eddng c\u00e1c th\u1ebb trong HTML4 v\u00e0 y\u00eau c\u1ea7u ph\u1ea3i vi\u1ebft th\u01b0\u1eddng cho nh\u1eefng ki\u1ec3u t\u00e0i li\u1ec7u c\u00f3 c\u1ea5u tr\u00fac ch\u1eb7t ch\u1ebd nh\u01b0 XHTML.<\/p>\n

<\/i>\n\t\t\tT\u1ea1i WebVN ch\u00fang t\u00f4i lu\u00f4n s\u1eed d\u1ee5ng c\u00e1c th\u1ebb vi\u1ebft th\u01b0\u1eddng\n\t\t\t<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"

V\u00ed d\u1ee5 v\u00e0 c\u00e1ch vi\u1ebft chu\u1ea9n c\u00e1c th\u00e0nh ph\u1ea7n HTML.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"yoast_head":"\nTh\u00e0nh ph\u1ea7n HTML - WebVN<\/title>\n<meta name=\"description\" content=\"V\u00ed d\u1ee5 v\u00e0 c\u00e1ch vi\u1ebft chu\u1ea9n c\u00e1c th\u00e0nh ph\u1ea7n HTML.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webvn.com\/thanh-phan-html\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Th\u00e0nh ph\u1ea7n HTML - WebVN\" \/>\n<meta property=\"og:description\" content=\"V\u00ed d\u1ee5 v\u00e0 c\u00e1ch vi\u1ebft chu\u1ea9n c\u00e1c th\u00e0nh ph\u1ea7n HTML.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webvn.com\/thanh-phan-html\/\" \/>\n<meta property=\"og:site_name\" content=\"WebVN\" \/>\n<meta property=\"article:published_time\" content=\"2015-01-03T04:48:04+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-10-10T14:07:48+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webvn.com\/thanh-phan-html\/\",\"url\":\"https:\/\/webvn.com\/thanh-phan-html\/\",\"name\":\"Th\u00e0nh ph\u1ea7n HTML - WebVN\",\"isPartOf\":{\"@id\":\"https:\/\/webvn.com\/#website\"},\"datePublished\":\"2015-01-03T04:48:04+00:00\",\"dateModified\":\"2015-10-10T14:07:48+00:00\",\"author\":{\"@id\":\"https:\/\/webvn.com\/#\/schema\/person\/c2ad947fe4ae598ecd7e70f369701020\"},\"description\":\"V\u00ed d\u1ee5 v\u00e0 c\u00e1ch vi\u1ebft chu\u1ea9n c\u00e1c th\u00e0nh ph\u1ea7n HTML.\",\"breadcrumb\":{\"@id\":\"https:\/\/webvn.com\/thanh-phan-html\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webvn.com\/thanh-phan-html\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webvn.com\/thanh-phan-html\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webvn.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Th\u00e0nh ph\u1ea7n HTML\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webvn.com\/#website\",\"url\":\"https:\/\/webvn.com\/\",\"name\":\"WebVN\",\"description\":\"C\u1ed9ng \u0111\u1ed3ng web Vi\u1ec7t Nam\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webvn.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/webvn.com\/#\/schema\/person\/c2ad947fe4ae598ecd7e70f369701020\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webvn.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d3cb5db4872f3219abbc0524da2e33b0?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d3cb5db4872f3219abbc0524da2e33b0?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"url\":\"https:\/\/webvn.com\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Th\u00e0nh ph\u1ea7n HTML - WebVN","description":"V\u00ed d\u1ee5 v\u00e0 c\u00e1ch vi\u1ebft chu\u1ea9n c\u00e1c th\u00e0nh ph\u1ea7n HTML.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webvn.com\/thanh-phan-html\/","og_locale":"en_US","og_type":"article","og_title":"Th\u00e0nh ph\u1ea7n HTML - WebVN","og_description":"V\u00ed d\u1ee5 v\u00e0 c\u00e1ch vi\u1ebft chu\u1ea9n c\u00e1c th\u00e0nh ph\u1ea7n HTML.","og_url":"https:\/\/webvn.com\/thanh-phan-html\/","og_site_name":"WebVN","article_published_time":"2015-01-03T04:48:04+00:00","article_modified_time":"2015-10-10T14:07:48+00:00","author":"admin","twitter_misc":{"Written by":"admin","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/webvn.com\/thanh-phan-html\/","url":"https:\/\/webvn.com\/thanh-phan-html\/","name":"Th\u00e0nh ph\u1ea7n HTML - WebVN","isPartOf":{"@id":"https:\/\/webvn.com\/#website"},"datePublished":"2015-01-03T04:48:04+00:00","dateModified":"2015-10-10T14:07:48+00:00","author":{"@id":"https:\/\/webvn.com\/#\/schema\/person\/c2ad947fe4ae598ecd7e70f369701020"},"description":"V\u00ed d\u1ee5 v\u00e0 c\u00e1ch vi\u1ebft chu\u1ea9n c\u00e1c th\u00e0nh ph\u1ea7n HTML.","breadcrumb":{"@id":"https:\/\/webvn.com\/thanh-phan-html\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webvn.com\/thanh-phan-html\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webvn.com\/thanh-phan-html\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webvn.com\/"},{"@type":"ListItem","position":2,"name":"Th\u00e0nh ph\u1ea7n HTML"}]},{"@type":"WebSite","@id":"https:\/\/webvn.com\/#website","url":"https:\/\/webvn.com\/","name":"WebVN","description":"C\u1ed9ng \u0111\u1ed3ng web Vi\u1ec7t Nam","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webvn.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/webvn.com\/#\/schema\/person\/c2ad947fe4ae598ecd7e70f369701020","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webvn.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d3cb5db4872f3219abbc0524da2e33b0?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d3cb5db4872f3219abbc0524da2e33b0?s=96&d=mm&r=g","caption":"admin"},"url":"https:\/\/webvn.com\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/webvn.com\/wp-json\/wp\/v2\/posts\/1394"}],"collection":[{"href":"https:\/\/webvn.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webvn.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webvn.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webvn.com\/wp-json\/wp\/v2\/comments?post=1394"}],"version-history":[{"count":7,"href":"https:\/\/webvn.com\/wp-json\/wp\/v2\/posts\/1394\/revisions"}],"predecessor-version":[{"id":1415,"href":"https:\/\/webvn.com\/wp-json\/wp\/v2\/posts\/1394\/revisions\/1415"}],"wp:attachment":[{"href":"https:\/\/webvn.com\/wp-json\/wp\/v2\/media?parent=1394"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webvn.com\/wp-json\/wp\/v2\/categories?post=1394"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webvn.com\/wp-json\/wp\/v2\/tags?post=1394"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}