WebD2: Essential Tags - University Of Washington
Có thể bạn quan tâm
Type the following markup into your file. This is the basic HTML structure of a web page. Note that you'll personalize the highlighted text contained in the title tags. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Web Portfolio: Your Name</title> </head> <body> <!-- The content of your web page will go here --> </body> </html>
You may find it easier to read if you add extra blank lines as you see in the example above. Also, indenting content that is inside of other content helps you to see the relationship between all the parts of the page. This is a standard practice for all markup, scripting, and programming languages.
Remember: Extra spaces and blank lines will be ignored when the HTML is displayed by a browser.
Let's now examine each of these tags:
- The first line is the DOCTYPE. It specifies the version of HTML you are using. HTML5 has a very simple DOCTYPE. All prior versions of HTML and XHTML had much longer and complicated DOCTYPE statements, but they can easily be found by searching the web, and can be copied and pasted into your web page. The DOCTYPE statement is necessary because it tells the browser which version of HTML you're using, so the browser knows how to process your code. . A common mistake among web developers is neglecting to include a DOCTYPE statement. Without a DOCTYPE statement, browsers have to guess which version of HTML you're using, and sometimes they get it wrong.
- <html> is typed before all the text in the document. This marks the beginning of the html document. It has a corresponding </html> tag that marks the end of the document. The entire web page, other than the DOCTYPE statement, is wrapped between these two tags.
- <head> Web pages are divided into two main sections: the head and the body. The head provides information about the document, including the author, description, keywords, title, and other information. The head section is closed with the </head> tag. In our "bare bones" document there are only two elements inside the head. They are:
- <title> You must give your document a title. This title doesn't actually appear within the web page, but appears in the title bar of the browser window. This is also the title of the page that will be displayed by default in search engine results or in user's Favorites. The title is closed with </title>
- <meta> is a tag that has many purposes, depending on what attribute it has. In our "bare bones" document, the attribute is charset, which is set to "utf-8". This is a required tag, which tells the browser which character set the web page is encoded in. There are many possible character sets, but "utf-8" is an international character set that is one of the most common. The <meta> tag is not a container tag. Therefore, it has no corresponding closing tag.
- <body> The body section contains the contents of your document
- <!-- Comment --> Comments are intended solely for people reading the source code, and are not visible when someone views the web page in a browser. See the section below on Comments In Your Code for additional information about this feature.
Từ khóa » Html Tag For Website
-
HTML A Tag - W3Schools
-
HTML Element Reference - By Category - W3Schools
-
: The Anchor Element - HTML: HyperText Markup Language | MDN
-
HTML Elements Reference - HTML: HyperText Markup Language
-
HTML Tag - GeeksforGeeks
-
Some Commonly Used HTML Tags - Columbia University
-
HTML Tags - CSUN
-
HTML Tags - Javatpoint
-
7 Essential HTML Tags That Separate SEO Pros From The Rookies
-
WebD2: Common HTML Tags - University Of Washington
-
HTML And CSS Tutorial - Nanyang Technological University
-
Basic HTML Tags - Top 10 Tags - CodeBrainer
-
How To Determine Tags On A Website - Small Business