6

Getting Started with HTML Coding

 1 year ago
source link: https://www.geeksforgeeks.org/getting-started-with-html-coding/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

What is HTML?

HTML is a Markup language i.e. a language that you can easily understand and write. It is developed in the early 1990s by the British Computer Scientist Tim Berners-Lee who was also credited for the development of the Word Wide Web(WWW).

HTML provided a simple way to structure and format the text and also to add links, images, and multimedia content on the web page.

The W3C (The current developer of HTML since the early 2000s) released HTML5, the latest version of HTML in the year 2014. HTML5 includes many new features and enhancements, such as improved multimedia support, new semantic elements for better document structure, and better support for mobile devices. HTML5 is now widely used for creating web pages and applications and is supported by all major web browsers and local editors.

Getting Started with HTML Coding

Getting started with HTML coding is not as difficult as it may seem. HTML is just a simple markup language, learning it just needs some reading and consistent practice. So before you start coding, it is recommended to learn the basic HTML syntax, tags, elements, semantics, links, and images.

In this, you will learn the basic tags of HTML which are commonly used in HTML coding.

HTML Tags – A to Z List

HTML Tags

Tags are the type of keywords that tells the web browser how to display or format the content written inside those tags. Tags have basically three parts opening tag, content, and closing tag.

Syntax:

<tag> Content... </tag>

Note: There are few HTML tags that are not closed like <br> tag, <hr> tag, etc.

Links

HTML links are hyperlinks that allow users to go from one web page to another web page by just clicking on that link.

Syntax:

<a href="URL"> Link Text</a>
HTML Link:  www.geeksforgeeks.org/html-links/

Images

HTML images are used to embed the images in your web pages to make them attractive and more resourceful.

Syntax:

<img src="URL" alt="alternative Image Text">

Semantics

Semantic elements are the elements that clearly classify the meaning of that element to the web browser and developer 

Semantic Elements: <article>, <form>, <table>, <header>, <footer>, <time>, etc. all these elements clearly describe the meanings.

Non-Semantic Elements: <div>, <span> etc.

By going through above mentioned links you can now understand the HTML codes very well.

Now, since you can now write the HTML code you must need an HTML editor so, let’s begin by setting up your HTML editor.

Setting the HTML editor

HTML text editors are used to create and modify web pages created using HTML. There are many online and offline/local text editors available that you can use.

Using Online Text Editor

There are many online HTML text editors on which you can write HTML code and instantly see how your web page will look so it makes it very easy to edit the text also there is no need for setting up a local editors 

GeeksforGeeks Online HTML Editor

<!-- DOCTYPE defines the information to the 
browser about the type of document -->
<!DOCTYPE html>
<!-- <html> tag tells the browser that 
it is an HTML code -->
<html>
<!-- head tag is a container which 
stores metadata -->
<head>
<!-- title tag is used to give a title 
to your document -->
<title>Example</title>
</head>
<!-- body tag contains all the content 
of your HTML document -->
<body>
<!-- Heading declaration of type 2 -->
<h2>Welcome To GFG</h2>
<!-- paragraph of the document -->
<p>The Computer Science Portal for Geeks</p>
</body>
</html>

Output:

html-article.png

The output of the above code

Using Local Text Editors

There are many local/offline text editors available for getting started with coding you need to have one of them. Some text editors are mentioned below:

  • Visual Studio Code 
  • Notepad
  • Notepad++
  • Sublime text

Now, Since you must have chosen your text editor, let’s begin by writing a simple HTML code.

<!DOCTYPE html>
<html>
<head>
<title>My Web Page</title>
</head>
<body>
<h1>My First HTML Document</h1>
<h2>Defination of HTML</h2>
<p>
HTML stands for Hyper Text Markup 
Language it is a standard markup 
Language for the documents designed 
to be displayed in the web browser.
The supported web browsers are 
Chrome, Edge, Safari, Opera and 
Firefox. For styling the HTML 
document we use CSS(Cascading 
Style Sheet)
</p>
</body>
</html>

Output:

html-article-1.png

The output of the above code


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK