Posts

Showing posts from March, 2020

Html Text Formatting

HTML Text Formatting HTML Formatting Elements HTML also defines special  elements  for defining text with a special  meaning . HTML uses elements like  <b>  and  <i>  for formatting output, like  bold  or  italic  text. Formatting elements were designed to display special types of text: ·  <b>  - Bold text ·  <strong>  - Important text ·  <i>  - Italic text ·  <em>  - Emphasized text ·  <mark>  - Marked text ·  <small>  - Small text ·  <del>   - Deleted text ·  <ins>  - Inserted text ·  <sub>  - Subscript text ·  <sup>  - Superscript text HTML <b>  and <strong>  Elements The HTML  <b>  element defines  bold  text, without any extra importance .  Example  <b>Th...

HTML Attributes

HTML Attributes We have seen few HTML tags and their usage like heading tags  <h1>, <h2>,  paragraph tag  <p>  and other tags. We used them so far in their simplest form, but most of the HTML tags can also have attributes, which are extra bits of information. An attribute is used to define the characteristics of an HTML element and is placed inside the element's opening tag. All attributes are made up of two parts − a  name  and a  value Attribute names and attribute values are case-insensitive. n  The  name  is the property you want to set. For example, the paragraph  <p>  element in the example carries an attribute whose name is  align , which you can use to indicate the alignment of paragraph on the page. n  The  value  is what you want the value of the property to be set and always put within quotations. The below example shows three possible values of align attri...

Html Headers

HTML HEADERS Headings are defined with the  <h1>  to  <h6>  tags. <h1>  defines the most important heading.  <h6>  defines the least important heading. It is important to use headings to show the document structure. <h1>  headings should be used for main headings, followed by  <h2>  headings, then the less important  <h3> , and so on. Each HTML heading has a default size. However, you can specify the size for any heading with the  style  attribute, using the CSS  font-size  property: Example <h1 style="font-size:60px;">Heading 1</h1> HTML Horizontal Rules The  <hr>  tag defines a thematic break in an HTML page, and is most often displayed as a horizontal rule. The  <hr>  element is used to separate content (or define a change) in an HTML page

Html Elements

HTML Elements HTML documents are made up of HTML elements. An HTML element usually consists of a  start  tag and an  end  tag, with the content inserted in between: <tagname>Content goes here...</tagname> The HTML  element  is everything from the start tag to the end tag: <p>My first paragraph.</p> HTML elements with no content are called empty elements. Empty elements do not have an end tag, such as the <br> element (which indicates a line break).

Html Paragraphs

HTML Paragraphs The HTML  <p>  element defines a  paragraph :  Exampl e  <p>This is a paragraph.</p>  <p>This is another paragraph.</p> HTML Display You cannot be sure how HTML will be displayed. Large or small screens, and resized windows will create different results. With HTML, you cannot change the output by adding extra spaces or extra lines in your HTML code. The browser will remove any extra spaces and extra lines when the page is displayed:  Example  <p>  This paragraph  contains a lot of lines  in the source code,  but the browser  ignores it.  </p>  <p>This paragraph  contains         a lot of spaces  in the source         code,  but the        browser  ignores it.  </p> HTML Line B...