First developed by Tim Berners-Lee in 1990, HTML stands for HyperText Markup Language. HTML is used to create electronic documents (called pages) that are displayed on the World Wide Web. Each page contains a series of links to other pages called hyperlinks. Every web page you see on the Internet is written with one version of this HTML code or another.
The HTML code ensures the correct text and image format for your Internet browser. Without HTML, the browser won’t know how to display text as an element, or load images or other elements. HTML also provides the basic structure of the page, on which cascading Sheets are overlaid to change the look of the page. One can think of HTML as the skeleton (structure) of a web page and CSS as its skin (appearance).
What does an HTML tag look like?
As shown in the HTML tag example above, there aren’t many elements. Most HTML tags have an opening tag containing the tag name, tag attribute, the closing tag containing the forward slash, and the tag name being closed. For tags without a closing tag like <img>, it’s best to end the tag with a slash.
Most tags are contained within smaller and larger curly braces, and everything between the opening tag and the closing tag is either visible or affected by the tag. In the example above, the <a> tag is creating a link named “Computer Hope” that points to the hope.html file.
What does HTML look like?
Below is an example of a basic web page written in HTML with a description of each part and its functionality.
<! DOCTYPE HTML PUBLIC “- // W3C // DTD HTML 4.01 Forward // EN” ” https://www.w3.org/TR/html4/loose.dtd “>
<html> <head> <title> Sample page </title> <meta http-equiv = “Content-Type” content = “text / html; charset = windows-1252”> </head> <body>
This is a title
Here is an example of a basic HTML page.
</body> </html> The box above contains the main elements of a basic web page. Each line is explained in more detail below.
The DOCTYPE line describes the version of HTML the page is written in so that the Internet browser can then interpret the text.
Các <html> mở thẻ cho phép các bí quyết trình duyệt mà nó đang đọc mã HTML.
Phần <head> chứa thông tin về trang, chẳng hạn như tiêu đề , các thẻ meta và nơi định vị tệp CSS .
Phần <body> chứa mọi thứ có thể xem được trên trình duyệt. Ví dụ: tất cả văn bản được nhìn thấy ở đây được chứa trong các thẻ body.
Thẻ <h1> là tiêu đề hiển thị của trang.
Thẻ <p> là một đoạn văn bản. Hầu hết các trang web (như trang này) đều có một số thẻ đoạn văn.
Chứa trong đoạn văn là thẻ <b> ghi đậm từ ví dụ trong đoạn văn.
Cuối cùng, các thẻ đóng bao bọc mỗi thẻ trên.
Xem trợ giúp về HTML và Thiết kế web của chúng tôi để biết danh sách đầy đủ các thẻ HTML.
What is HTML5?
, <rp>, <rt>, <ruby>, <time>, <track>, <video> and <wbr>. There are also new input types for forms, including tel, search, url, e-mail, datetime, date, month, week, time, datetime-local, number, range, and color.
With a growing movement to keep structures and styles separate, a number of styling elements have been removed. Additionally, tags with accessibility or very little used issues are also removed. The following elements will no longer be used in HTML code: <acronym>, <applet>, <basefont>, <big>, <center>, <dir>, <font>, <frame>, <frameset>, <noframes>, <strike> and <tt>. HTML5 also simplifies the document type declaration for the tag in the following box.
<! What does the html> HTML5 doctype look like? As shown below, the HTML5 code is very similar to the previous HTML4 example, but more obvious and has a modified document type tag.
<! doctype html>
<html> <head> <meta charset = “utf-8”> <title> Sample page </title> </head> <body>
This is a title
<p> This is an example of a basic HTML page. </body> </html>
How to create and view HTML
Since HTML is a markup language, it can be created and viewed in any text editor if saved with the .htm or .html file extension. However, most find it easier to design and create web pages in HTML using an HTML editor.
Once the HTML file is created, it can be viewed locally or uploaded to a web server to be viewed online using a browser.
What file extensions are used with HTML?
HTML files use the .htm or .html file extension. Older versions of Windows (Windows 3.x) only allowed three-character file extensions, so they used .htm instead of .html. However, both file extensions have the same meaning and can be used today. That being said, we recommend sticking to a naming convention as certain web hosts may prefer one extension over the rest.
Bài viết được dịch từ https://www.computerhope.com/jargon/h/html.htm