HTML(Hypertext Markup Language) is a coding language used for creating webpages.
The following is a very simple HTML document:
<!DOCTYPE html> <html> <head> <title>This is a title</title> </head> <body> <p>Hello world!</p> </body> </html>
- HTML basics: <html>, <head>, <body>
- HTML paragraph: <p>
- HTML images: <img>
- HTML quotes: <q>, <blockquote>
- HTML headers: <h1>, <h2>, <h3>, <h4>, <h5>, <h6>
- HTML sections : <div>,<header>, <footer>
How do I get started using HTML?
- Copy and paste the code above into a text editor. If you need a text editor I’d suggest you download Sublime Text (free version available)
- Save the file as index.html on your desktop.
- Double click the index.html file and your page should open up in your browser. This is your webpage!
HTML tags vs. HTML elements: What’s the difference?
Often you’ll hear people talk about “HTML Tags” and “HTML elements.” While the two are often interchangeably, there is a slight difference. Let’s look at the following example:
<h1>The New York Times</h1>
In this example the entire ELEMENT is <h1></h1>, whereas within the element there are two TAGS. There are some HTML elements that only have one tag (for example, <img>) and so in that case you could say either. At the end of the day, developers use these two terms interchangeably, and it’d be rare (and uncool) for someone to call you out on saying tag vs. element. But at least now you know the difference.