HTML and CSS are 5&6. HTML gives elements and structure, while CSS define the styles and how elements are displayed.
Basic HTML structure
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Page Title Here</title> </head> <body> <h1>H1 Heading Text</h1> </body> </html>
1. <!DOCTYPE> - Document Type
doctype tag is used for specifying which language and version the document is using. Each HTML document must begin with a document type declaration that declares which version of HTML the document is using. This is referred to as the document type declaration (DTD).
2. <html> ... </html> - Root tag.
HTML webpage has a root tag known as <
This defines the beginning of an HTML document.
The root tag is defined by opening <
html> and closing </
3. <head>...</head> - Head Tag
- This is always the first element in an HTML element.
- Head element contains important and technical information about a webpage.
- Information in Head element is used by search engines and browser.
- Styles, Page Title, Metadata, Scripts are all defined in the head element.
- All information inside the head is not displayed to the user.
4. <body>... </body> - Body Tag
The body tag contains all the visual components (elements) of a webpage. This is where you use tags to define an element that is displayed to the user on screen. E.g. Image, paragraph, heading, form, text, etc.
In the next Lesson, we are going to see how to create HTML visual components (elements) on our webpages.//= htmlentities($post["body"]); ?>