Basic code elements and their uses (Part 2)

Hello viewers, welcome to another blog and in this, we will know some coding elements and their uses, Basic elements of html | what are the main elements of an html document ? 7 basic elements of programming | what are the five basic elements of a c++ program? list of html elements | What are the basic elements of programming? What can basic coding be used for?


basic-code-elements-and-their-uses-source-code-cracked-hacker-coding-computer-technology-internet-chrome-google

Styling text

You can style text in HTML using the tag <em>  emphasizes the text. Like this.

There is also a tag that is called as <strong> or <b> that makes the text bolder which can also be used to attract viewers to the text and make it unique.

Line Breaks

The spacing between code in an HTML file doesn't effect the positioning of elements in the browser. To modify the space in the browser, you can use HTML's line break element <br>. 
Unique about this element is that it has only starting tag means no ending tags... You can use it anywhere within your HTML code and a line break will be shown in the browser.

Unordered List

In HTML you can use unordered list tag (<ul>) to create a list of items in no particular order. An unordered list outlines individual list items with a bullet point.
 
The <ul> element should not hold raw text and won’t automatically format raw text
 into an unordered list of items. Individual list items must be added to the unordered
 list using the <li> tag. The <li> or list item tag is used to describe an item in a list.

Must Read-  BASIC CODING ELEMENTS AND THEIR USES (PART 1)

Ordered List

Ordered list <ol> are like unordered list, except that each list item is numbered. They are useful when you need to list different steps in a process or rank item from first to last.

You can create the ordered list with the <ol> tag and then add individual list items to the list using <li> tags.

Images

All of the elements you’ve learned about so far (headings, paragraphs, lists, and spans) share one thing in common: they’re composed entirely of text! What if you want to add content to your web page that isn’t composed of text, like images?

The <img> tag allows you to add an image to a web page. Most elements require both opening and closing tags, but the <img> tag is a self-closing tag
 
The <img> (image) tag has a required attribute called src.
The src attribute must be set to the image’s source, or the location of the image. In this case, the value of src must be the uniform resource locator (URL) of the image. A URL is the web address or local address where a file is stored.

Image Alts

Part of being an exceptional web developer is making your site accessible to users of all backgrounds. In order to make the Web more inclusive, we need to consider what happens when assistive technologies such as screen readers come across image tags.

The alt attribute, which means alternative text, brings meaning to the images on our sites. The alt attribute can be added to the image tag just like the src attribute. The value of alt should be a description of the image.

Basic elements of html | what are the main elements of an html document ? 7 basic elements of programming | what are the five basic elements of a c++ program? list of html elements | What are the basic elements of programming? What can basic coding be used for?

Comments

Most Popular Post

Comments box

Name

Email *

Message *