HTML for Absolute Beginners


Hypertext Markup Language revision 5 (HTML5) is markup language for the structure and presentation of World Wide Web contents. HTML5 supports the traditional HTML and XHTML-style syntax and other new features in its markup, New APIs, XHTML and error handling.

There are three organizations that are currently in charge of the specification of HTML5:

  1. Web Hypertext Application Technology Working Group (WHATWG) created the HTML5 specification and is in charge of the HTML5 development that provides open collaboration of browser vendors and other involved parties.
  2. World Wide Web Consortium (W3C) is in charge with delivering the HTML5 specification.
  3. Internet Engineering Task Force (IETF) is in charge of the development of HTML5 WebSocket API.

HTML5 comes with a lot of flexibility and it supports the following features −

  • Uppercase tag names.
  • Quotes are optional for attributes.
  • Attribute values are optional.
  • Closing empty elements are optional.


the Doctype in older version is written to longer bit in the HTML5 is just specify the doctype

<!DOCTYPE html>

Character Encoding

<meta charset = "UTF-8">

<link> tag

In older version there define the file types but here just defile the path of the file:-

<link rel = "stylesheet" href = "stylefile.css">

<script> tag

Script syntax also can write so simple as :

<script src = "scriptfile.js"></script>

HTML5 Attributes

In the HTML Attributes are be specified within start tags and must never be used in the end tags.

HTML5 attributes are case insensitive so we can write in all uppercase or mixed case, but most common convention is written with lowercase.

Custom Attributes

A new feature introduced in HTML 5 called as custom data attributes.

A custom data attribute starts with data- and the name will be user define.

Here is a simple example −

<div class = "example" data-name = "website" data-value = "dynamic">

there use two custom attributes called data-name and data-value. Using those attribute you able to get the values using JavaScript APIs or CSS in similar way as you get for standard attributes.

What is CSS and type with brief description

What is CSS and type with brief description

What is CSS and type with brief description.
We all are know about the HTML. Basically all the website are design using the HTML (that is called front-end web development). So When we are design a front-end that time we are use the HTML code. But the HTML is not only create the hole website front-end development with a good graphical design. To complete front-end development we are use the CSS(stands for Cascading Style Sheets).

So What is CSS and type with brief description

CSS stands for Cascading Style Sheets. The CSS can control HTML elements how they are displayed on web browser.
There are three way to write CSS for a website. Mean there are three types of CSS.

  • Inline styles
  • Embedded styles or Internal styles
  • External styles
  1. Inline styles: Inline styles are written directly in the tag and it only affect specific tag they are written the CSS. Syntax:style="" Example:
<a href="" style="color:red;text-decoration: underline;">Web Design</a>

Output: Web Design

Explain: Here the “style” tag content the CSS for the anchor tag. So when the browser display the link text then its display text color RED and the text underline.

2. Embedded styles or Internal styles: Embedded styles or Internal styles are written in the HTML HEAD section and this CSS affect the current HTML file where the CSS is present. Example:

<!DOCTYPE html>
<title>This is the title of the page.</title>
 <p class="classname">This is a paragraph.</p>
 <a href="" class="blue">This is a link.</a>

Output: This is a paragraph This is a link.

3. External styles: External styles are written outside of the HTML file in a separate document and then attached to various web documents. Now in this time most website use the External styles. How to link the External styles:

<link href='url' rel='stylesheet' type='text/css' />
how to write External styles or Internal styles

So here we discuss about the how to write basic CSS for External styles or Internal styles.
Both are same process using the “class name” or the “id name” or “attributes name” or the “tags name”. for the class name we are use the “.”(dot) before the classname for denoted the class like .classname , for ID use “#” like #id , for attribute like [attribute^=”value”] and tag name just use the tag name.
For define class and use:

Define Class and write CSS regarding this class Example: 
<a href="" class="classname">This is a link</a>
Example: .classname{color:red;}

For define ID and and write CSS regarding this ID with Example:
<a href="" id="IDname">This is a link.</a>

How to write CSS using attribute Name:: 
<a href="" target="_blank">This is a link.</a>
 Example:a[target="_blank"] { color: black;}

How to write CSS using tag name:: 
<a href="" >This is a link.</a>
 Example:a{ color: black;}

*Notes: Most professional web designers are use a External styles to govern a site’s layout and design. The disadvantage to external style sheets is that every page will use every style in the CSS sheet, So some of pages will load a much larger CSS page than that actually required. But Advantage : for a website have one CSS file and its load once for the all pages because the browser can cache the CSS file for first time and that case the CSS file can’t hit second time and the website load quickly.

I hope this article helped you to learn what is css and types?.