Chapter 1: GETTING TO KNOW HTML

<Tag>

An HTML element typically has three portions
1. Opening tag,
2. Content
3. Closing tag

<!DOCTYPE> Declaration

The <!DOCTYPE> declaration defines the document type and version of HTML.

This tells the browser that this is an HTML5 document.

<!DOCTYPE html>

<html> Tag

The <html> tag represents the root of an HTML document. It is the container for all other HTML elements.

<html></html>

<head> Tag

The <head> tag contains meta-information about the HTML document, such as its title, scripts, and styles.

<head></head>

<body> Tag

The <body> tag contains the visible content of the HTML document.All the content you're reading right now is inside the <body> tag.

<body></body>

<title> Tag

The <title> tag defines the title of the document, shown in the browser's title bar or tab.The browser tab has the title of this page: "Chapter 1: Basic HTML Structure".

<title></title>

<meta> Tag

The <meta> tag provides metadata about the HTML document, such as character set, viewport settings, and descriptions.This page uses <meta charset="UTF-8"> to specify character encoding and <meta name="viewport"> for responsive design.

<meta charset="UTF-8"/>

<style> Tag

The <style> tag is used to define CSS styles for the HTML document. We can use inline, internal and external css.

For inline css: "style" Attribute

For internal css: <style> <style>

For external css: <link rel="stylesheet" href="style.css">