HOME | PHP Tutorial | CSS
facebook icon
AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP
PHP Tutorial

PHP forms
HTML Tutorial

CSS Tutorial

HTML Tags Attributes


<< Previous Page
HTML Elements
Next Page >>
HTML Text and Paragrafs

HTML Tutorial » HTML Tags Attributes

A browser reads everything you write in the HTML document.
Each time he finds a tag, he will treat it as such and render it, such as a paragraph, a title, a table, or whatever.
The tags have three parts as I said before the opening, the content and the closing.

As you can learn, there are hundreds of HTML tags. Absolutely all the elements that will be played by a browser need a tag or two.
<opening tag>Continut</closing tag>

HTML Attributes
  • All HTML elements can have attributes
  • Attributes provide additional information about an element
  • Attributes are always specified in the start tag
  • Attributes usually come in name/value pairs like: name="value"


Tags in HTML - examples


Tags are written in lowercase letters. This is the standard for writing in XHTML and Dynamic HTML.
In the following example we show you some of the tags.
- headings <h1>, <h2>, <h3> ...
- paragraph <p>
- bold <strong>
- italic <em>
- create hyperlinks <a>
- create lists <ul> & <ol>
- defines a section within an HTML page <div>

Example:

<!DOCTYPE html>
<html>
<head>
<title> Information on the content of the pages. My first web page!</title>
</head>

<body>
<h1> Information on the content of the pages. My first web page!</h1>
<p> Here we have a Paragraph</p> <br />
<strong> Here we have a strong Paragraph </strong> <br />
<em> Here we have an italic Paragraph </em> <br />
<a href="https://www.agernic.com/html-tutorial.html">Visit our HTML tutorial</a> <br />
<ul>
<!-- <ul> tag -->
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ul>
<ol>
<!-- <ol> tag -->
<li>Coffee</li>
<li>Tea</li>
<li>Milk</li>
</ol>
</body>
</html>

Note: Exceptions - Tags that do not need closing:
<img src="/assets_tutorials/img/image.jpg" /> -- Image Tag --
<br /> -- Line Break Tag --
<input type="text" size="12" /> -- Input Field --
<hr>


Attributes in HTML - examples


In the following example we show you some of Attributes.
The href Attribute
The src Attribute
The width and height Attributes
The alt Attribute
The style Attribute

Example2:

<!DOCTYPE html>
<html>
<head>
<title> Information on the content of the pages. My first web page!</title>
</head>

<body>
<a href="https://www.agernic.com">This is a link</a> <br />
<img src="img_html.jpg"> <br />
<img src="img_html.jpg" width="400" height="300"><br />
<img src="img_html.jpg" alt="agernic html"><br />
<a href="https://www.agernic.com/html-tutorial.html">Visit our HTML tutorial</a> <br />
</body>
</html>



<< Previous Page
HTML Elements
Next Page >>
HTML Text and Paragrafs


HTML Tutorial - Tags and attributes - html tutorial

2620. Basics : How to Learn More - HTML Tutorial
HTML basics - HTML tutorial
http://www.echoecho.com/htmlbasics06.htm

2652. Hexcolors : Named Colors - HTML Tutorial
HTML hexcolors - HTML tutorial
http://www.echoecho.com/htmlhexcolors06.htm

2659. Images : Alternative Text - HTML Tutorial
HTML images - HTML tutorial
http://www.echoecho.com/htmlimages05.htm

2673. Links : Link to New Window - HTML Tutorial
HTML links - HTML tutorial
http://www.echoecho.com/htmllinks10.htm

2640. Frames : Default Pages - HTML Tutorial
HTML frames - HTML tutorial
http://www.echoecho.com/htmlframes03.htm

3198. HTML button link - How to create a button style in HTML, html tutorial
HTML button link - How to create a button style in HTML html tutorial
https://www.agernic.com/html-tutorial/html-button-link-how-to-create-a-button-style-in-html.html

Your add here
PHP explode() function

PHP rtrim() function

PHP strtolower() function

PHP define() function

PHP trim() function

PHP htmlentities() function

PHP substr() function

PHP str_split() function

PHP md5() function

PHP htmlspecialchars() function

PHP ucfirst() function

PHP implode() function

PHP strtoupper() function

PHP strlen() function

PHP strstr() function

PHP str_replace() function

CSS align image center - how to create
CSS Padding, top, bottom, left, right
HTML image, size, link and image background
Display data from SQL database with MySQLi into php - html table
HTML Table Style
HTML - Elements: body, head, title