HTML (Hyper Text Markup Language) is the cornerstone of the modern internet. Below you can find the questions people ask most about the language, its elements and tags.
HTML was originally released in 1993 and is the markup language used to create pages and applications on the internet.
HTML elements are the building blocks of pages and applications which consist of many tags put together in a semantic form. Elements can constitute pieces of text, images, videos and many other forms of content.
1. Are HTML tag names cases sensitive?
No tag names and attribute names are not case sensitive.
However, the accepted standard is for tags to be formed using lower case letters (i.e. <table></table>).
2. Are HTML tables obsolete?
For structural purposes, yes. For laying out tabular data purposes, no.
A few years ago, it was standard practice to use HTML tables structurally to help form the layout of a page.
An example of using tables structurally would be to put some header content in a single cell on the top row of a table, the content in the row below and the footer content in the row below.
HTML tables should only be used to layout tabular data not for structural purposes as this can now be accomplished more efficiently using CSS and other HTML tags.
3. Are HTML and CSS programming languages?
The ‘Is HTML a programming language?’ question has been bouncing around the internet since its inception and really is very subjective.
But in reality, no.
HTML is a markup language intended to store information while CSS is a stylesheet language intended to express the presentation of structured documents.
Given the above, you can’t really classify either as a ‘programming language’.
4. Are HTML and CSS front end technologies?
Yes, they are both front-end.
Traditionally, front-end technologies are those the end users will directly interact with. Back-end technologies usually serve the front-end services.
5. Is HTML easy to learn?
Yes, HTML is straightforward and easy language to learn, given the time.
As mentioned above, HTML is a markup language annotating text and other content and is easily human readable which makes it much easier to learn than a programming language.
Almost anyone could learn the basics within a few days, I would recommend starting with one of these tutorials:
6. Is HTML XML?
Although they may look similar, they have a number of fundamental differences of structure and purpose:
- XML (Extensible Markup Language) is a framework for defining markup languages whereas HTML is a markup language itself.
- Designed to present data, HTML has a focus on how it looks whereas XML was designed to store and transport data.
- HTML is case insensitive, XML is case sensitive.
- HTML has predefined <tags> whereas in XML tags are defined by the author.
- XML requires closing tags whereas HTML does not require closing </tags> in some instances.
7. Is HTML worth learning?
HTML is one of the cornerstones of the web and will continue to be for the foreseeable future, any aspiring web developer will need to have a firm grasp on the language.
8. Are HTML files safe or are they dangerous to open?
No, not always, especially when attached to or saved from e-mails.
HTML files can be used to deliver malicious code intended to mine peoples personal data as well a host of other unscrupulous goals. They are often used by scammers and attached to e-mails as they stand a better chance of circumventing virus protection than traditional means of attack.
Commonly, malicious HTML files contain webpages that are designed to imitate legitimate businesses (such as banks, retailers, etc) and trick the user into clicking a link and / or entering personal data.
Do not fall for it, do not ever enter enter personal data (or any other sensitive data) into forms or other web pages that are attached to or linked to from emails.
9. Where are HTML files stored?
HTML files can be stored in many different places but mainly they are stored on a server connected to the internet, up in the cloud.
They can be attached to emails or saved on your local computer. The versatility and portability of the HTML document is one of the reasons they have become so successful.
10. What is the most common mistake beginners make while learning HTML?
Forgetting to close the tag!
For example, a paragraph element should have opening (<p>) and closing </p> tags. Beginners tend to miss the closing tags which can cause the entire document not to display correctly.
11. How to view a sites HTML code?
On Windows in most modern browsers:
Hold the ‘Control’ key and press ‘U’ (Control + U) or press F12.
On Mac in Safari or Chrome:
Hold the ‘Command’ and ‘Option’ keys and press ‘U’ (Control + Option + U)
12. How to edit HTML?
You can edit HTML within most text editors (Notepad on Windows or TextEdit on Mac).
However, there are many dedicated editors which provide a bunch of tools specifically to help craft HTML.
Some of the popular programs for editing markup include:
Adobe Dreamweaver (Paid)
13. Why is doctype html used?
The <!DOCTYPE> declaration must be the first thing within an HTML document.
The <!DOCTYPE> declaration is used to tell clients and web browsers which version of HTML the document is written in so that they can correctly interpret and display the documents contents.
14. How to change the font size in HTML?
To change the font size of text within an HTML element or tag we use CSS. The snippet below will show ‘My Text’ in the default font size of the page.
To control this we must add a ‘style’ attribute to the tag and specify the size we you like the text to be shown. So to make it larger we could try:
<div style="font-size: 40px;">My Text</div>
to make it smaller we could try:
<div style="font-size: 9px;">My Text</div>
15. How to center / left / right align text in HTML?
As we did in the example on how to change the font size above, we need to add a style attribute to the tag containing the text we need to center.
This time we use the ‘text-align’ directive. The text is usually left aligned by default:
We should be able to align to the center by using the following:
<div style="text-align: center;">My Text</div>
and to the right using… you guessed it:
<div style="text-align: right;">My Text</div>