-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
79 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
using EasyHtmlToolkit.Enums; | ||
|
||
namespace EasyHtmlToolkit.Models.Elements | ||
{ | ||
/// <summary> | ||
/// Represents an HTML <abbr> (abbreviation) element. | ||
/// </summary> | ||
public class AbbrTag : HtmlElement | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="AbbrTag"/> class. | ||
/// </summary> | ||
public AbbrTag() : base(ETag.abbr) { } | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="AbbrTag"/> class with the specified inner text and optional title attribute. | ||
/// </summary> | ||
/// <param name="innerText">The inner text of the <abbr> element.</param> | ||
/// <param name="title">The optional title attribute of the <abbr> element.</param> | ||
public AbbrTag(string innerText, string? title = null) : base(ETag.abbr) | ||
{ | ||
InnerText = innerText; | ||
|
||
if (!string.IsNullOrEmpty(title)) | ||
{ | ||
AddAttribute("title", title); | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// Sets the title attribute value of the <abbr> element. | ||
/// </summary> | ||
/// <param name="title">The title attribute value.</param> | ||
public void SetTitle(string title) | ||
{ | ||
AddAttribute("title", title); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using EasyHtmlToolkit.Enums; | ||
|
||
namespace EasyHtmlToolkit.Models.Elements | ||
{ | ||
/// <summary> | ||
/// Represents an HTML <b> (bold) element. | ||
/// </summary> | ||
public class BTag : HtmlElement | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="BTag"/> class. | ||
/// </summary> | ||
public BTag() : base(ETag.b) { } | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="BTag"/> class with the specified inner text. | ||
/// </summary> | ||
/// <param name="innerText">The inner text of the <b> element.</param> | ||
public BTag(string innerText) : base(ETag.b) | ||
{ | ||
InnerText = innerText; | ||
} | ||
} | ||
} |