Modern layout fundamentals
Theory: Intro to HTML
What is HTML?
HTML (Hypertext Markup Language) is a language for marking up hypertext, it's a set of rules by which the browser distinguishes headings from lists, tables from pictures, and so on. HTML appeared in 1993 and was intended to standardize the rules for displaying text within web pages.
Take a good look at the page you're on now. All of it, regardless of appearance, is written using HTML. It does a good job of showing that no matter how complicated the page is, the whole essence of it has remained the same for more than 20 years.
The word "language" in HTML should be taken to mean rule. HTML by itself only marks up the data; it doesn't interact with it in any way and does nothing with it visually. All the work of displaying text data and markup is done by the browser.
You can try to open the markup of this page using Ctrl + U (Cmd + Option + U on macOS).
Don't be intimidated by all the stuff you can see there. In time, this will stop looking like gibberish, and you'll easily navigate HTML markup.
Let's take a look at a small example of HTML:
Right now, it may seem unclear what section, h1, and p mean. But now the most important thing is that behind all these constructions is the text content.
Always put content before visual appearance. The courses will give you many different block styling techniques, but don't get carried away. If the text on the page is hard to read, the page will have almost no value.
Tags in HTML
But what did the mysterious section, h1, and p mean? In markup language, they're called tags. It's the tags that wrap our content and ultimately get processed by browsers.
One of the tags it's important to learn about is a paragraph. Paragraph, like paragraphs in real life, allows you to separate sections of text by meaning. Visually, this is usually done using indentation. There are many paragraphs on this page, and you can easily distinguish them from each other by the spacing between them.
In order to insert a paragraph into a page, you need to specify a special construction, <p> and </p>, with a paragraph of text between them.
As you'll have noticed, we may have more than one paragraph. Almost all HTML tags can be used multiple times on one page.
The paragraph tag has an opening <p> and a closing </p>. It is because of this that the browser understands where the paragraph begins and where it ends. These tags are called paired tags.
You may imagine that if there are paired tags, then there'll also be unpaired tags. And you're not wrong! In the process of working with layout design, you'll learn about these tags and how they're used Take your time :)
Another key concept that goes alongside tags is nesting. Look again at the example markup:
In this example, we have a paired section tag, and inside it there are other tags and text inside them. This concept is an important one that allows you to build large systems.
Sometimes, nesting is a necessary part of text markup. For example, lists cannot be made without using nesting.
The browser will output this HTML markup as follows:
- The first list item
- The second list item
Without li tags, the browser cannot distinguish between plain text and list items.
Attributes
Another important concept in HTML is attributes and what they mean. Attributes are just additional information for the browser.
In HTML, you can use links to navigate the web. It's not enough to just provide a link tag (<a></a>) and the text inside.
Browsers, unfortunately, can't read our thoughts and redirect the user where we want :(
To redirect the user, we have to help the browser and tell it where the user will go after clicking on the link. This requires the href attribute, the value of which is the desired link.
Now, when the user clicks on the link, they'll be successfully redirected to the address we specified inside the href attribute.
General HTML tag format
Do it yourself
Use any online service that can convert HTML markup. For example, https://htmlcodeeditor.com/.
Insert the following markup in the left part:
Look at the final result. Try deleting different tags and changing them. Experiment, it won't bite :)

