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…

url canonicalization: how it affects seo and how to fix it

Inlining css in html helps with SEO

URL Canonicalization is the process where by a resource that has multiple URL or URIs pointing to it is standardized to a single URL. The process does not involve removing or changing the other URLs, but just designating one of the URLs as the “normal” or “standard” URL. The process is also known as normalization or standardization. For example, your home…

seo: should you use outbound links in your pages and its effect in seo

content with external links

Having outbound or external links in your content is often a marker of good quality content. It can positively affect your brand reputation and your search engine ranking. Firstly, let’s first define what an outbound link is. A link or URL in a webpage is a piece of content that an user can click on and browse or be redirected to…

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…

how to add a favicon to my website and uses of a favicon

A Favicon is a graphic icon or a small image that is associated with a website and displayed as a visual indicator of your website. It is meant to be an abbreviated term for Favorite Icon. Most websites have a brand and a brand image that uniquely identifies it. The favicon is usually the brand image in a smaller form,…

seo: broken links in webpages and its effects in seo

DocType tag in HTML

As websites get larger and larger with ever-growing content, it gets to be a nightmare to maintain. It is true for any website, unless you have a big enough and dedicated development team. 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…

how to center text horizontally inside an HTML element such as div or span

When coding your webpage layout in HTML, you will often need to center elements inside or with in another HTML element. Centering a text (or any element) means horizontally aligning the piece of content in the center of the parent tag. Quite often, it will be text that needs to centered but it can be an image or any other…