part6:Learn html - HTML elements

3 34
Avatar for yara
Written by
4 years ago

Hey everyone , In this article I'm going to show you some previous elements we have talked about before and also new elements ,and before we get started let me remind you that you choose an html element based on if it makes sense, and in case you don't like how it looks ,you can change it by css (style sheet).

1.Headings

In the first part of this tutorial we have used <h1> and <h2> heading and we have said there are 6 levels (h1.... to ....h6) of headings ,but why? . because, Assistive reading devices such as screen readers use the document outline to help users quickly scan and navigate through a page. In addition, search engines look at heading levels as part of their algorithms (information in higher heading levels may be given more weight)

2.Paragraphs

A really simple html element to indicate a paragraph written as <p></p> used to describe a paragraph in your content and is a block element which means it is always displayed in a new line

3.Unordered List

Just like an example of any list that isn't necessary in order names ,foods or streets written as <ul> ...</ul> and <li>...</li> for list items nested inside it

for example an unordered list of names

<ul> 
<li> john</li>
<li>lisa </li>
<li>sara </li>
</ul>

4.Ordered List

Same as the unordered list way of writing the element is just different <ol> instead and it is used in ordered stuff like the first student the second student and so on

5.Preformatted Text

the <pre>..</pre> element is used when you want something to be typed as it is because the browser for example ignores more than one space so if you want alot of spaces between your words pre is the go

6.Long Quotations

If you have a long quotation, a testimonial, or a section of copy from another source, mark it up as a <blockquote> element. It is recommended that content within </blockquote> elements be contained in other elements, such as paragraphs, headings, or lists.

7.A horizontal rule

For putting a line <hr> element and it doesn't have a closing tag

The inline elements

1.Emphasized text

Use the em to emphasize the text ,it is usually displayed in italic and is important in the meaning

2.Important text

Makes the word bold use the <strong> ..</strong> element

4.Short quotations

Use the quotation (q) element to mark up short quotations, such as โ€œTo be or not to be,โ€ in the flow of text. According to the HTML spec, browsers should add quotation marks around q elements automatically, so you donโ€™t need to include them in the source document. Some browsers, like Firefox, render curly quotes, which is preferable. Others (Safari and Chrome, which I used for my examples) render them as straight quotes as shown in the figure.

5.Adding Breaks

A very important html element to add a line ,because sometimes you just want a line there and here and this element doesn't have a closing tag just simply <br>

3
$ 0.01
$ 0.01 from @TheRandomRewarder
Avatar for yara
Written by
4 years ago

Comments

It's really nice. This is helpful for everyone. Thanks for sharing this ๐Ÿ’•

$ 0.00
4 years ago

glad you liked it

$ 0.00
4 years ago

I'm new here. I already subscribe you. If you want plz subscribe me โ˜บ๏ธ ๐Ÿ’•. Thank you.

$ 0.00
4 years ago