how to center images vertically and horizontally in html and css

html center image

Aligning elements in a webpage is probably one of the most challenging things for a beginner. You know all the HTML tags and your code is correct but somehow things just don’t align how you want it to be. One of the important concepts to understand is the type of elements: block elements and inline elements. Inline elements will go…

how to add a line break in html

comments in html source

Most if not all of the HTML browsers ignore the typical line breaks and spaces that are in the source code such as “Enter”, multiple “spaces”, “tabs” etc. This means that the line breaks you see in the source code will not translate when the page gets rendered in the browser. using html br tag In order to insert line…

how to add extra spaces between text or words in html

comments in html source

When authoring web pages and programming in HTML, you might have noticed that no matter how many spaces you put between words or text elements they get collapsed to a single space when rendering the page. When writing text or sentences in most text processing software, you will be able to hit the space bar multiple times and add multiple…

how to set font size or size of text in html or css

Google Fonts

Defining the size of text in different contexts is important when designing and developing webpages. In HTML, there are primarily two different ways of specifying the font size or size of text. One is using the font tag and the other is using cascading style sheets or CSS. According to the latest W3C recommendations, the best way to change the…

how to insert vertical line in html and css

Inlining css in html helps with SEO

It is easy enough to insert or draw a horizontal line in html. But how do you draw a vertical line in html? Unlike for the horizontal line, there is no single tag in html that will draw the vertical line. But that does not mean it is impossible to do so. Using CSS One way to do this is…

how to write comments in html source code

comments in html source

If you have done programming in any language, you must realize how important comments are in understanding code. Of course, you need to write good comments and maintain them regularly. When done correctly, it is an invaluable tool in understanding code logic in long running code bases. HTML or Hyper Text Meta Language is no different. HTML is not a…

how to use ‘for’ loop in bash shell scripts

for loop in bash

If you have done any programming in any language, you should be familiar with loops. Almost all computer programming languages have some version of a loop statement. It is a language construct that allows you to execute a specific piece of code repeatedly, often with different set of data. In this post, we will talk specifically about the for loop…

how to use wget to find broken links on your website

broken links detection with wget

As websites get larger and larger with ever-growing content, it could easily get to be a nightmare to maintain. It is true for any website. But this is especially true of a blog, a forum or any site with a constant influx of new content. Over time, content on the website can get outdated and removed. This could lead to…

7 linux commands that will help you learn other linux commands

man rm command

One of the daunting task that most Linux beginners face is the sheer number of several different commands and utilities that are available. Some of these commands might¬†seem to do the exact same things. Each of these commands have numerous command line options on top of it. Yes. having choices comes at a price. It is quite impractical to learn…

how to change line spacing or line height in html

html line spacing css

When coding html pages for a website, the line spacing of the text content is probably one of attributes that is usually¬†left as default. Most of the time, you do not even think about it and the default works the best in most browsers. The line spacing or line height is the vertical height between lines of text in a…