"An Introduction to HTML"

 



What is HTML? 
  • HTML is a building language. 
  • It helps create and function web pages. 
  • Any code for a website is first written in HTML. 
  • It consists of tags, elements, and attributes.

What does HTML stand for? 

HTML stands for HyperText Markup Language.

The best way to explain HTML is to breakdown the meaning of each word.

HyperText refers to text that contains links to other texts. Every time you click on a highlighted or underlined link that takes you to another page, you are using hypertext. 

Markup refers to the special symbols that are inserted into a document to tell the web browser how to display the document data. In HTML, those could be attributes, tags, or elements.

Language refers to the idea that the code is standardized. Just like regular spoken languages, there are certain rules that everyone must follow when writing HTML. This is so that all browsers can understand and interpret the code. 

If we put these three definitions together, we could say that HTML is “a programming language that uses unique code which allows you to display linked documents in a browser”.



What are HTML Tags, Attributes, and Elements? 

They are the basis of the language HTML.

Tags: they are used to mark up the start of an HTML element and they are usually enclosed in angle brackets. An example of a tag is: <h1>.

Most tags must be opened <h1> and closed </h1> in order to function.

Attributes: they contain additional pieces of information. Attributes take the form of an opening tag and additional info is placed inside.

An example of an attribute is:

<img src="cat.jpg" alt="A photo of a cat.">

In this instance, the image source (src) and the alt text (alt) are attributes of the <img> tag.

ElementsThe HTML element is everything from the start tag to the end tag:
<tagname>Everything here is HTML element..</tagname>

Examples of some HTML elements:

<h1>My First Heading</h1>
<p>My first paragraph.</p>

HTML Editors

There are many choice in the market to choose a HTML editor. Each one have their pros and cons so it is recommended to research about each and every editor to know which one suits you the best.

Common HTML Editors are:
  • Notepad
  • TextEdit
  • Visual Studio Code
  • Atom
  • Sublime
Basic HTML structure

The basic structure of HTML when writing in any editor is: 

<!DOCTYPE html>
<html>
<head>
<title>Basic structure</title>
</head>
<body>

<h1>This is a heading.</h1>
<p>This is a paragraph.</p>

</body>
</html>






Let's create a basic form using HTML

If you run the following code: 

<form>
  <label for="fname">First name:</label><br>
  <input type="text" id="fname" name="fname"><br>
  <label for="lname">Last name:</label><br>
  <input type="text" id="lname" name="lname">
</form>

You'll get: 

Where can I learn HTML in more detail?

There are numerous ways to learn HTML. The best way to learn it is to practice. Other than that, check out W3Schools for more detailed explanation on HTML!

Happy learning!

Comments

Popular posts from this blog

"Design Wizardry Without the Wand (Seriously!)"

"Data Analysis 101"

"Where to start learning Java?"