What is HTML?

[vc_row row_type=”row” type=”grid” text_align=”left” padding_top=”120″ padding_bottom=”4″ ][vc_column][vc_column_text]

HTML , or HyperText Markup Language, is a simple markup language used to make web pages.

 

Although all modern word processors and many specialized tools can be used to make web pages without learning HTML at all, learning HTML itself is a useful way to learn more about the web and provides more control over the results. Luckily, HTML is very simple and quite easy to learn.

 

HTML was intended to be an instance of SGML, a general-purpose markup language, but many HTML pages do not comply with the requirements of SGML. XHTML, which supersedes HTML, is a newer standard which complies fully with the requirements of XML. XML itself is a further refinement of SGML.

 

Here is a simple example of an HTML document. To try this out for yourself, simply create a new file called mypage.html with any text editor, such as Windows notepad. Paste in the HTML below, make any changes that please you, and save the document. Then pick “open” from the File menu of your web browser, locate the file you have just made, and open it. If you make further changes, you will need to “save” again and then click “reload” or “refresh” in your browser to see the results.

 

Of course, this is just a simple example. HTML can do far, far more than this. A complete tutorial can be found at Dave’s HTML Guide.

 

<title>Title of My Page Goes Here</title>
<h1>Heading Of My Page Goes Here</h1>
<a href=”http://news.google.com/”>Follow this link to Google News</a>
<p>
Here is a picture of my cat:
</p>
<p>
<img src=”cat.jpg” />
</p>

 

Notice that the HTML elements are simple enough to recognize and nearly self-explanatory. The text between the opening and closing <title> and </title> elements becomes the title of the web page. The text between the <h1> and </h1>elements is displayed as a “level one heading,” which is typically a very large, bold font. The text between the opening and closing <a> and </a> elements becomes a link to another web page; the URL of the web page to be linked to is found in the HREF attribute of the <a> element as shown in the example above. The <p> element encloses a paragraph.

 

The <img> element includes an image in your page; the image is displayed at that point in the page, as long as the image file specified by the URL in the SRC attribute actualy exists. Since the SRC attribute I used here contains a simple filename, the cat picture will be shown as long as the file cat.jpg is in the same directory as the page. The same trick can be used in HREF attributes in <a> elements, to conveniently link to pages in the same directory. For more information about images and how to create them in formats appropriate for the web, see the image file formats entry.

 

The <img> element has a / before the > to signify that it is not a container and that no closing </img> is expected.

 

Of course, a web page sitting in a file on your own computer is not yet visible to anyone in the outside world. See the setting up web sites entry to learn more about how to create web sites that others can see.

 

[/vc_column_text][/vc_column][/vc_row]