| <!DOCTYPE html> |
The tag is a needed tag that goes outside the <body> </body> tags. This tag defines the webpage and states that the type of the document is html so that the browser classifies it that way. If you do not include this tag it is fine on most browsers like Google Chrome but others there will be errors. Validator will error if there is no <!DOCTYPE html>. |
No Examples* |
| <html lang="en"> |
The tag is a must-have tag that goes outside the <body> </body> tags. This tag wraps around every other tag except <!DOCTYPE html> and basically says "everything inside this tag is html". The attribute lang="en" states that the language for the webpage is html. Other languages can be chosen if English is not the correct language. |
The current language of this webpage is english or "en" |
| <meta charset="UTF-8"> |
The tag is an important tag that goes outside the <body> </body> tags. This tag defines the encoding of the website (the character set). This makes sure that special characters from other languages get interpreted correctly and included. |
No Examples* |
| <title></title> |
The tag is a useful tag that goes outside the <body> </body> tags. This tag defines the title of the webpage that can be seen at the top of the browser inside the tab. |
The title of this webpage is "HTML/CSS Guide" |
| <style></style> |
This tag defines the internal CSS of the webpage such as background color, text color and any other CSS rule in CSS standard library. |
*The background color is darker and the text is lighter because of internal CSS and <style></style> tag within this webpage. |
| <link rel="stylesheet" type="text/css" href="styles.css"> |
This tag defines the stylesheet for the webpage. |
Both pages of this website are styled by one styles.css file. |
| <link rel="icon" type="image/x-icon" href="favicon.ico"> |
This tag adds a favicon to the top of the page. |
The favicon is the New York Mets logo. Take a look at the top and see. |