What syntax HTML has to offer is arranged with attributes and elements that define “tags”. And it is the “Semantics” of the attributes and elements that is the lifeforce behind well-designed HTML websites and web applications.
Here, we should also mention that HTML is Hypertext Markup Language, which, together with Cascading Style Sheets or simply, CSS, form the powerful technology for crafting cutting-edge web experiences. While HTML is used to align the dimensions and form the skeletal structure, CSS forms the audio-visual layout, as in the style and environment of the webpage.
Now, let us break down the components of HTML syntax to give beginners a comprehensive picture of the vitals of the matter.
The basics of well-written code in HTML is to pay attention to the accuracy of tags. It is pretty much in the hands of the programmers, how they wrap, enclose and embed tags at different areas of the document, and thus design webpages and develop web experiences with custom appearances and actions.
Here are the rules that you should follow in order to have seamless HTML syntax:
Every HTML document starts with the Doctype declaration – <!DOCTYPE html>
The HTML document itself begins with <html> and ends with </html>.
The main content of the document is placed under the <body> and </body> enclosed tag.
Then eventually comes the subheading, section heading, paragraph, and so on
The <br> tag is used to insert line breaks in the text. It applies as a line division without changing paragraphs. It is an empty tag, which means it does not require a closing tag.
Let’s have a closer look at the basic HTML Syntax with all the things that go into it.
<!DOCTYPE html>
<html>
<body>
<h1>First Heading</h1>
<p>First paragraph.</p>
<p>To force<br> line breaks<br> in a text,<br> use the br<br> element.</p>
<p>Second paragraph</p>
</body>
</html>
If you are looking to insert links in the content, then follow the HTML Link syntax with <a> and </a> tags. The hyperlinks are inserted between these open and closing tags. Any content you put inside the tag turns into a hyperlink. So you need the <href> attribute to specify the destination. Now following this rule lands your URLs in the designated web pages.
TO LEARN HTML VISIT: www.w3schools.com/htmL/html_attributes.asp