"An Introduction to 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.
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”.
<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.
Examples of some HTML elements:
- Notepad
- TextEdit
- Visual Studio Code
- Atom
- Sublime
<html>
<head>
<title>Basic structure</title>
</head>
<body>
<h1>This is a heading.</h1>
<p>This is a paragraph.</p>
</body>
</html>
<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>
Comments
Post a Comment