HTML (HyperText Markup Language) is a standard markup language used to create and structure content on the web. It defines the structure and layout of web pages, allowing browsers to interpret and display the content correctly.
HTML is used to: 1. Create web pages 2. Structure content 3. Define layout and formatting
The founder of HTML is Sir Tim Berners-Lee, a British computer
scientist. He invented HTML (Hypertext Markup Language) in 1991
Berners-Lee is also credited with inventing the World Wide Web and developing fundamental
technologies like HTTP (Hypertext Transfer Protocol) and URLs (Uniform Resource Locators)
The latest version of HTML is HTML5, which was officially finalized in October 2014. However, it's now part of the living standard, continuously updated with new features and improvements.
HTML 1.0: Introduced in 1991 HTML 2.0: Released in 1995 HTML 3.2: Published in 1997 HTML 4.01: Released in 1999 XHTML 1.0: Introduced in 2000,
Elements: HTML elements represent different types of content, such as
headings, paragraphs, images, links, forms, tables, etc.
Tags: HTML tags are used to define elements, and are typically surrounded by angle brackets (<
and>).
Attributes: HTML attributes provide additional information about elements, such as styles,
links, or behaviors.
HTML5 introduced several new features and elements that improved the structure,
New Semantic Elements:
1. article: Represents an independent piece of content.
2. aside: Represents content related to the main content.
3. nav: Represents a section of navigation links.
4. section : Represents a section of related content. 5. header : Represents the header section of a document or section. 6. footer : Represents the footer section of a document or section.
- h1 - Main heading (largest)
- h2 - Subheading
- h3 - Sub-subheading
- h4 - Sub-sub-subheading
- h5 - Sub-sub-sub-subheading
- h6 - Sub-sub-sub-sub-subheading (smallest)
<h1> <h2> <h3> <h4> <h5> <h6>
Block-level elements: - Occupy the full width of their parent container - Start on a new line - Can have a width and height set - Examples: div, p, h1-h6, ul, ol, li, table, etc.
Inline-block elements:
- Occupy only the space needed for their content
- Do not start on a new line
- Can have a width and height set
- Examples: span, a, img, input, label, etc. (when set to display: inline-block)