Career skills to jumpstart your future.

LightSpeed HTML Coding for Beginners | Part-2

Advanced HTML Coding for Beginners 

So, you've learned about the significant constituents of an HTML Document. You have also seen the format of a standard HTML Document. If you have not visited the Part-1 of this series, click here to visit the earlier part. What you learned in the previous section is not enough if you want to step up the game. This blog will be about the different types of tags and attributes that will help in beautifying your Web page. 

Before we get started, if you have some spare time, kindly go to the previous part to revise the constituents of a web page and learn more.

Let Us Get Started

First, get to know about the various tags and attributes that can be used and their functions.

1. <br> -The HTML <br> element produces a line break in text. It is useful for writing a poem or an address, where the division of lines is significant.

2. <p>- The paragraph element <p> defines a paragraph in HTML. Browsers insert empty lines before and after each paragraph. The syntax is <p align=left/center/right>.

3. <hr>- The horizontal rule <hr> element draws a horizontal line across the page. It is an empty element and has no OFF tag. The <hr> element accepts the following attributes: SIZE, WIDTH, ALIGN, NOSHADE and COLOR.

  • SIZE attribute- The SIZE attribute specifies the thickness of the line in pixels. The default value is 2 pixels.
  • WIDTH attribute- The WIDTH attribute specifies the horizontal width of the line. The measurement can either be a value given in pixels (e.g., 50px) or a percentage of the page width (e.g., 50%)
  • ALIGN attribute- The ALIGN attribute specifies the horizontal alignment of the line. Its value can be LEFT, CENTER or RIGHT. The attribute value is between " ".
  • COLOR attribute- The COLOR attribute specifies the colour of the line. It can be a colour name or a hexadecimal code.
  • NOSHADE attribute- The NOSHADE attribute displays a solid line with shading.



4. Headings- The Headings element tells the browser that a piece of text is heading. The browser then displays it differently from normal text. HTML provides for six heading levels. Headings are container elements and written like this:

<h1> Heading Text </h1>

Pro-Tip: The Heading element <h1> gives the most significant size of the text. <h6> gives the smallest size of the text. You can say that the Heading element works in decreasing order.



5. Comments - Any text placed as a comment will be ignored by the browser. Comments are used by programmers to explain their code to others reading their code or themselves when they read their code in the future. 

The comment tags are <!-- and -->. Any text between  <!-- and --> will be ignored by the browser.

6. Bold, Underline and Italics- The <b>, <u> and <i> are the tags for marking text as bold, underline and italics. They all are container elements and have an ON tag and an OFF tag.

7. Center- The Center tag is used to centre text between the left and right margins. It is a container element. For example:

                <center> AChhaya </center>

Pro-Tip - The Center tag is a deprecated element in HTML 4.01. A Deprecated element is an element that is still supported but may become obsolete in the future.

8.FONT element- The FONT element is used to specify the size, colour, and font of the text they enclose. FONT is a container element. There are three attributes of the <font> tag. They are-SIZE, COLOR and FACE.

  • SIZE attribute- The SIZE attribute sets the relative size of the text. There are 7 sizes, and the default size is 3. For example, <font size="5"> This font size is 5 </font> 
  • COLOR attribute- The COLOR attribute sets the colour of the text. You can give either the name of the colour or its hexadecimal value in the #RRGGBB form. 
  • FACE attribute- The FACE attribute sets the font face for the text. For example, <font face="Helvetica"> AChhaya </font>


Done!

NEXT PART ↓↓↓↓↓↓






Comments

Popular posts from this blog

LightSpeed Basic Animation for Beginners in Flash 8 | Part-2

LightSpeed Intro to ConvNets

LightSpeed Basic Animation for Beginners in Flash 8 | Part-1

A honest review of the Data and Deployment Specialization

What Grammar Means to a Blogger | Try Grammarly today!