Programming Diaries
191 subscribers
13 photos
6 files
10 links
Welcome to programming Diaries. To find different articles, resources, blogs, questions, tutorials, books and many more about various programming languages. Contact @jamesScript for info @diaryOfaProgrammerGroup for discussion
Download Telegram
#HTML (HyperText Markup Language)
Most people confuse it as a programming language. while it is just a markup for a text on a web browser. HTML is also known as a skeleton of a website because every website was first coded by it. One can insert images and videos through HTML in their website. Though the most popular one is HTML5, there were previous versions of it which no one uses anymore.
#HTML elements are delineated by tags, written using angle brackets. Tags such as <img /> and <input /> directly introduce content into the page. Other tags such as <p> surround and provide information about document text and may include other tags as sub-elements. Browsers do not display the HTML tags, but use them to interpret the content of the page. For example if i say <p>Programming languages</p> the output on the web browser will only be "Programming languages"
#HTML Tags and Syntaxes
Tags are elements surrounded by angle brackets. like
<tagname>content</tagname>

They normally come in pairs which are the starting and ending tag. the end tag is usually the same but has a forward slash.
<tagname> Starting tag
</tagname> Ending tag

There are a very few tags that are self closing. that means they have no ending tags.
like <br />, <hr />, <img />, <input /> etc.
#HTML links
Links are found in nearly all web pages. Links allow users to click their way from page to page.
HTML links are hyperlinks.
You can click on a link and jump to another document.
When you move the mouse over a link, the mouse arrow will turn into a little hand. To show links on HTML an "a" tag is used.

<a href="url">Link text</a>
For example: <a href="google.com"> Visit google.com </a>
#HTML Class and Id
These are the most important things in HTML since they help select elements in different things. either to style the html using css or make the page dynamic using javascript the elements have to be selected and this is where the class and id attributes comes in handy.
Both class and id are used to give the elements in html a specific name which can be used in other languages later. The difference between them is classes can be used many times. while id names are different with every html element. you cant use the same id name that you used in the previous lines of code.

<h2 class="city">Paris</h2>
<p class="city">Paris is the capital of France</p>

Here we used the class name two times and that is okay. But with id the names have to be different just like

<h2 id="city">Paris</h2>
<p id="capitalCity">Paris is the capital of France</p>