A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::open($save_path, $name) should either be compatible with SessionHandlerInterface::open(string $path, string $name): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 132

Backtrace:

File: /home/u648970804/domains/tutiongo.com/public_html/application/controllers/Tutorials.php
Line: 7
Function: __construct

File: /home/u648970804/domains/tutiongo.com/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::close() should either be compatible with SessionHandlerInterface::close(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 294

Backtrace:

File: /home/u648970804/domains/tutiongo.com/public_html/application/controllers/Tutorials.php
Line: 7
Function: __construct

File: /home/u648970804/domains/tutiongo.com/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::read($session_id) should either be compatible with SessionHandlerInterface::read(string $id): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 168

Backtrace:

File: /home/u648970804/domains/tutiongo.com/public_html/application/controllers/Tutorials.php
Line: 7
Function: __construct

File: /home/u648970804/domains/tutiongo.com/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::write($session_id, $session_data) should either be compatible with SessionHandlerInterface::write(string $id, string $data): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 237

Backtrace:

File: /home/u648970804/domains/tutiongo.com/public_html/application/controllers/Tutorials.php
Line: 7
Function: __construct

File: /home/u648970804/domains/tutiongo.com/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::destroy($session_id) should either be compatible with SessionHandlerInterface::destroy(string $id): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 317

Backtrace:

File: /home/u648970804/domains/tutiongo.com/public_html/application/controllers/Tutorials.php
Line: 7
Function: __construct

File: /home/u648970804/domains/tutiongo.com/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Return type of CI_Session_files_driver::gc($maxlifetime) should either be compatible with SessionHandlerInterface::gc(int $max_lifetime): int|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Filename: drivers/Session_files_driver.php

Line Number: 358

Backtrace:

File: /home/u648970804/domains/tutiongo.com/public_html/application/controllers/Tutorials.php
Line: 7
Function: __construct

File: /home/u648970804/domains/tutiongo.com/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 282

Backtrace:

File: /home/u648970804/domains/tutiongo.com/public_html/application/controllers/Tutorials.php
Line: 7
Function: __construct

File: /home/u648970804/domains/tutiongo.com/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_set_cookie_params(): Session cookie parameters cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 294

Backtrace:

File: /home/u648970804/domains/tutiongo.com/public_html/application/controllers/Tutorials.php
Line: 7
Function: __construct

File: /home/u648970804/domains/tutiongo.com/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 304

Backtrace:

File: /home/u648970804/domains/tutiongo.com/public_html/application/controllers/Tutorials.php
Line: 7
Function: __construct

File: /home/u648970804/domains/tutiongo.com/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 314

Backtrace:

File: /home/u648970804/domains/tutiongo.com/public_html/application/controllers/Tutorials.php
Line: 7
Function: __construct

File: /home/u648970804/domains/tutiongo.com/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 315

Backtrace:

File: /home/u648970804/domains/tutiongo.com/public_html/application/controllers/Tutorials.php
Line: 7
Function: __construct

File: /home/u648970804/domains/tutiongo.com/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 316

Backtrace:

File: /home/u648970804/domains/tutiongo.com/public_html/application/controllers/Tutorials.php
Line: 7
Function: __construct

File: /home/u648970804/domains/tutiongo.com/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 317

Backtrace:

File: /home/u648970804/domains/tutiongo.com/public_html/application/controllers/Tutorials.php
Line: 7
Function: __construct

File: /home/u648970804/domains/tutiongo.com/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 375

Backtrace:

File: /home/u648970804/domains/tutiongo.com/public_html/application/controllers/Tutorials.php
Line: 7
Function: __construct

File: /home/u648970804/domains/tutiongo.com/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: ini_set(): Session ini settings cannot be changed after headers have already been sent

Filename: drivers/Session_files_driver.php

Line Number: 108

Backtrace:

File: /home/u648970804/domains/tutiongo.com/public_html/application/controllers/Tutorials.php
Line: 7
Function: __construct

File: /home/u648970804/domains/tutiongo.com/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_set_save_handler(): Session save handler cannot be changed after headers have already been sent

Filename: Session/Session.php

Line Number: 110

Backtrace:

File: /home/u648970804/domains/tutiongo.com/public_html/application/controllers/Tutorials.php
Line: 7
Function: __construct

File: /home/u648970804/domains/tutiongo.com/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_start(): Session cannot be started after headers have already been sent

Filename: Session/Session.php

Line Number: 143

Backtrace:

File: /home/u648970804/domains/tutiongo.com/public_html/application/controllers/Tutorials.php
Line: 7
Function: __construct

File: /home/u648970804/domains/tutiongo.com/public_html/index.php
Line: 315
Function: require_once

HTML Attributes Tutorials | Tutiongo
x
Home
html

HTML Attributes Tutorials

HTML attributes provide additional information about HTML elements.


HTML Attributes

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

The href Attribute

The <a> tag defines a hyperlink. The href attribute specifies the URL of the page the link goes to:


Link Example:

<a href="https://www.tutiongo.com">Visit Tutiongo</a>


Try it Yourself


You will learn more about links in our HTML Links chapter.


The src Attribute

The <img> tag is used to embed an image in an HTML page. The src attribute specifies the path to the image to be displayed:


IMG Src Example:

<img src="car.jpg">


Try it Yourself


Image alt With Width Attribute


The required alt attribute for the <img> tag specifies an alternate text for an image, if the image for some reason cannot be displayed. This can be due to slow connection, or an error in the src attribute, or if the user uses a screen reader.


IMG Alt Attribute 

<img src="car.jpg" alt="red card" width=">


Try it Yourself


Broken Image Source


See what happens if we try to display an image that does not exist:

Broken Image 

<img src="ccar.jpg" alt="red card">


Try it Yourself


Style Attribute


The title attribute defines some extra information about an element.

The value of the title attribute will be displayed as a tooltip when you mouse over the element:


Style Atttribute

<p style="color:red"> This is red paragraph </p>


Try it Yourself


The Title Attribute


The title attribute defines some extra information about an element.

The value of the title attribute will be displayed as a tooltip when you mouse over the element:


Title Atttribute

<p title="I'm a tooltip">This is tool paragraph </p>