Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Can not show html tag without escaped #654

Closed
yangg opened this issue Jan 6, 2025 · 3 comments
Closed

[Bug]: Can not show html tag without escaped #654

yangg opened this issue Jan 6, 2025 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@yangg
Copy link

yangg commented Jan 6, 2025

Platform

macOS

Version

latest

Bug Description

image

Steps To Reproduce

ask a html related question

Expected Behavior

correct show html tag <span>

Relevant Log Output

No response

Additional Context

No response

@yangg yangg added the bug Something isn't working label Jan 6, 2025
@yangg
Copy link
Author

yangg commented Jan 6, 2025

Creating a card in HTML that is fully clickable and also contains a link inside it that navigates to a different page can be achieved using semantic HTML elements. Here is an example of how you might structure this:

Explanation:

  1. Semantic HTML Elements: The card is wrapped inside a <section> and <article> tags to provide meaningful structure.
  2. Main Clickable Card: The <a> tag with the class .card is used to make the entire card clickable, navigating to page1.html.
  3. Internal Link: Inside the card, another <a> tag is used for the link that will navigate to page2.html.
  4. Styling: Basic CSS styles are applied to make the card look visually appealing and to ensure it behaves as expected when hovered over.

Key Points:

  • The <a> tag wrapping the card ensures the entire card is clickable.
  • The internal <a> tag ensures that the link inside the card is also clickable and can navigate to a different page.
  • Using semantic HTML elements like <main>, <section>, <article>, and <header> helps improve the readability and accessibility of the HTML document.

This approach ensures that the entire card is clickable while also allowing for specific links within the card to navigate to other pages.

@yangg
Copy link
Author

yangg commented Jan 6, 2025

<AlertDialog>
  <AlertDialogTrigger>Open</AlertDialogTrigger>
  <AlertDialogContent>
    <AlertDialogHeader>
      <AlertDialogTitle>Are you absolutely sure?</AlertDialogTitle>
      <AlertDialogDescription>
        This action cannot be undone. This will permanently delete your account
        and remove your data from our servers.
      </AlertDialogDescription>
    </AlertDialogHeader>
    <AlertDialogFooter>
      <AlertDialogCancel>Cancel</AlertDialogCancel>
      <AlertDialogAction>Continue</AlertDialogAction>
    </AlertDialogFooter>
  </AlertDialogContent>
</AlertDialog>

create a function confirm using the above html structure
自己发的也是一样。
image

@kangfenmao
Copy link
Collaborator

已修复

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants