HTML

Share

What is HTML?

HTML (HyperText Markup Language) is the name of the code language used to write webpages. Every time your web browser accesses a web page, what it's really doing is downloading a file that contains HTML code that tells the browser what the web page looks like. An example of HTML source code would be:

<!DOCTYPE html>
<html lang="en-us">
<meta charset="utf-8">
<title>This shows on the web browser tab.</title>
<h1>A sample webpage.</h1>
<!-- a comment that doesn't get displayed. -->
<p>A paragraph with a <a href="https://www.example.com/">link<a>.

As you can see, HTML is composed of HTML tags with literal text inside, e.g. <tag>text</tag>. Tags can have attributes, written as key="value" pairs. If you see text code like this, it`s often HTML.

HTML is similar to XML, but there are some differences. For example, <div /> is an auto-closing tag in XML, but in HTML it's only an opening tag (in XHTML it worked like in XML).

Webpages aren't made entirely of HTML. They also use other code in other languages like CSS and Javascript.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *