Tag Archives: tag

Myths and Realities of Replaced elements in HTML

Replaced Elements in HTML Myths and Realities - YWF (2)

According to official specs, replaced elements are content outside the scope of the CSS formatting model, such as an image, embedded document, or applet. For instance, the content of the HTML IMG element is often replaced by the image that its src attribute designates. Besides, replaced elements often have intrinsic dimensions, such as an intrinsic width, an intrinsic height, and an intrinsic height specified in absolute units. Now, you may have a general description of what a replaced element is, but as a web developer, you have to look deeper about replaced elements.

Replaced Elements in the Real World
To discuss in a full description about the replaced elements, we need to go to a different resource, namely the Rendering section of the HTML Living Standard document. But, when you look deeper, the specs can be confusing. This is because some HTML elements operate as replaced elements all the time, while other do it only in specific circumstances.

Embedded Content
Embedded content is the first category of replaced elements. Embedded content means any element that imports another resource into the document, or content from another vocabulary that is inserted into the document. While these external resources have the intrinsic dimensions that match the requirements of the definition.

Embed, iframe, and video are the main elements in this category. Since they always import external content into your document, these elements are always treated as replaced elements. There are more elements that a bit more complicated that fall into this category only in special circumstances, such as:

  • applet – Treated as a replaced element when it represents a plugin, otherwise it’s treated as an ordinary element.
  • audio – Treated as a replaced element only when it is “exposing a user interface element”. Will render about one line high, as wide as is necessary to expose the user agent’s user interface features.
  • object – Treated as a replaced element when it represents an image, plugin, or nested browsing context (similar to an iframe).
  • canvas – Treated as a replaced element when it represents embedded content. That is, it contains the element’s bitmap, if any, or else a transparent black bitmap with the same intrinsic dimensions as the element.

Images
Images are others elements that treated as a replaced element with the intrinsic dimensions of the image. This category also includes the input elements with a type=”image” attribute.

When the image is not rendered on the page, things get a bit more complicated for several reasons. The <input type=”image”> will be displayed as a normal button.

Default Size of Replaced Elements
We can understand this elements by these three basic rules:

  • if the object has explicit width, height and ratio values, use them;
  • if the object only has ratio, use auto for both width and height while maintaining the said ratio;
  • if none of these dimensions are available:
    – use width: 300px; height: 150px when the viewport is larger than 300px
    – use “auto” for both width and height and a ratio of 2:1 when the viewport is smaller than 300px;

What About the Other Types of Form Controls?
There are many misconceptions about other types of form controls are replaced elements too. After all, these elements are also rendered with a default width and height. In fact, most people consider intrinsic dimensions actually comes from the following line:

Each kind of form control is also described in the widgets section, which describes the look and feel of the control. Another reason why form control looks different from one browser to the next and from one OS to another:

The elements defined in this section can be rendered in a variety of manners, within the guidelines provided below. User agents are encouraged to set the ‘appearance’ CSS property appropriately to achieve platform-native appearances for widgets, and are expected to implement any relevant animations,etc, that are appropriate for the platform.

Conclusion
It is easy to get confused about replaced elements and form controls. But, they are different categories of HTML elements, with <input type=”image”> being the only form control that is a replaced element.

 

3 Golden Rules of Title Tags & SEO

3 Golden rules of Title tags and SEO

Title tags may seem simple but it is actually terribly impactful to your SEO effort and everyone in SEO service is pretty aware with this stuff. Since title tags remain important is because of one basic reason, it shows the overall label for the content of a page. However, as the amount of title tag’s character is limited makes it is quite difficult to optimize it. But don’t you worry, there are many ways to Rome and below are 3 golden rules to achieve the most of it.

Rule 1: Have One Distinct Page for Each Major User Need You Address

Since every people will have different needs and ways of thinking about every product or service, therefore it will be better if you address each of those major needs. Commonly, you will find some stages in this process, such as getting your key team members together and brainstorming, polling users on their needs, studying competitive sites, and then supplementing that with keyword research. In keyword research, you usually will see three types of categories of keywords:

  1. Global: Keywords that have a general and broad reach
  2. Regional: keywords that only can reach on local area
  3. Profession specific: Keywords related to the profession of the searcher.

By knowing these three types of categories of keywords, you will comprehend how to address specific prospective customer needs in all represent opportunities. Moreover, it is important to be noted that classifying your product per group logically will help your customers find everything they want easily.

Rule 2: Don’t be too specific in Your Webpage’s Topic

There are clear limits for how specific that you should be in your webpage’s topic. Even though the chart in your keyword tracker shows all of the top variants of “global” terms but don’t overwhelm your website with all of the keywords that you search for. Since overwhelming your pages with a lot of keywords will cause you a bad user experience.

Rule 3: Don’t Reuse Title Tags

The most common problem we see, when we run our crawler on a client’s website is that every website usually uses the same title tag. Even if the page is different, it is essentially duplicate content. In fact, the title tag is the title for the page; therefore Google puts in major weight on this in determining the relevancy of a page. You may find cases where you have trouble coming up with different title tags, but the question is “why does that page exist?” You may be falling into thin slicing at this point or you can create unnecessarily duplicating pages which is one of the easiest things to detect in an SEO audit.

What is Google Tag Manager?

What is Google Tag manager

Nowadays, a lot of tools are given to help digital marketers perform better through a more eligible data. Some of the most popular one are Google analytics and Google tag manager; both of them offer many benefits which can also be used as a tool to analyze data. There is lot of explanations about Google analytics since it has been popular among many digital marketers and SEO services, so this time we will discuss about tag manager which is also amazing to be used while it may not as widespread as Google analytics. Therefore, if this tool hasn’t been familiar in your ear, you can read the brief explanation of Google tag manager below since we’ve outlined what it is and what advantages it can bring to you.

Google Tag Manager Defined

Google Tag manager is a free tool which works as marketers assistant to control digital marketing data by using code snippets on any website. It helps giving a report of conversion tracking, website analytics, retargeting, and many more tracking purposes. Google Tag Manager permits customization based on the user requirements, using the user’s own set of tools. It results in better integrations based on current work processes.

Moreover, It provides you with full control about how your tags fire and are defined. Therefore, tags management permits marketers to be able to manage tags easily onto the website. The elimination of that step in the process also eliminates cost and helps improve the website. In fact, making changes without IT or developer involvement is simple nowadays since the existence of Google Tag Manager.

Google Tag managers at some points have some similarities with Google analytics, and the main similarity between Google Tag Manager and Google Analytics lies in the use of codes. Both give users a code to be placed within the site for website tracking when they are signing up. Moreover, both of them use the data-layer to everything that gets passed through Google Analytics and Google Tag Manager where it contains different variables on the site.