Description

What is HTML? Common Tags and It's Explanations

UI Design Evolution

What is HTML?

HTML stands for HyperText Markup Language. It is the standard language used to create and structure content on the web. It tells the web browser how to display text, links, images, and other forms of multimedia on a webpage. HTML sets up the basic structure of a website, and then CSS and JavaScript add style and interactivity to make it look and function better.

Why Learn HTML?

Learning HTML is essential for various practical reasons:

Foundation of Web Development: HTML is the starting point for creating websites. Understanding HTML is crucial for any web development or web design role.

Universal Language of the Web: HTML is the standard markup language used to create the structure of web pages. Knowledge of HTML is necessary to manage any content on the Internet.

Easy to Learn: HTML is straightforward compared to programming languages. Beginners can quickly learn how to create basic websites with just HTML. Career Opportunities: Proficiency in HTML opens up various career paths, including web developer, content manager, and UX/UI designer roles. Gateway to Advanced Technologies: Once you master HTML, you can easily move on to learn CSS, JavaScript, and other tools that enhance websites, making them more interactive and visually appealing.

2. Basic HTML Template

<!DOCTYPE html>
<html>
<head>
  <title>My First Web Page</title>
</head>
<body>
  <h1>Hello, World!</h1>
  <p>This is my first web page.</p>
</body>
</html>

HTML DOCTYPE (Document Type Declaration) is an instruction that appears at the beginning of an HTML document, before thetag. Its primary role is to tell the web browser which version of HTML the page is written in, ensuring that the browser renders the content correctly. It is not an HTML tag, but rather a special instruction that specifies how the browser should interpret the HTML. It is recommended to always use at the top of your HTML file for HTML5. For HTML5, the declaration looks like this:

< !DOCTYPE html >

Note: The declaration is NOT case-sensitive.

How HTML Doctype tell the browser which version of html it is? The declaration doesn’t directly specify which version of HTML is being used (like, "HTML5" or "HTML4"), but rather it tells the browser to use a specific rendering mode. It helps the browser determine how it should interpret the content. There are two main modes: Standards Mode: The browser will render the page according to the modern web standards. Quirks Mode: The browser will render the page in a backwards-compatible manner, emulating older web behavior to handle legacy content. Example of Using DOCTYPE in HTML5 Here, for example, we declare , which triggers standard mode and tells the browser to use HTML5 specifications.

What Happens Without Without ,

your HTML code can still run, but it may face several significant drawbacks: Quirks Mode Activation: Browsers may switch to quirks mode, leading to outdated behaviors that cause inconsistent rendering compared to standards mode. Rendering Issues: CSS properties like box-sizing, margins, and widths may be interpreted differently, causing layout problems and misaligned elements that are difficult to debug. Cross-Browser Inconsistencies: Different browsers might render the page differently in quirks mode, making it hard to achieve cross-browser consistency. CSS and JavaScript Problems: Modern features like Flexbox, Grid, and certain JavaScript methods may not work correctly, causing compatibility issues. Unpredictable Behavior: Without rendering becomes unpredictable, making debugging more challenging and leading to unpredictable page behavior when adding new features.

 

 

 

Your browser does not support PDFs. Download PDF.